From 70df757586db17aa72490c79421d7b2a452b72ec Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Fri, 25 Sep 2020 17:13:31 -0300 Subject: [PATCH] Remove lodash as runtime dependency --- src/TapRating.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/TapRating.js b/src/TapRating.js index c6c9d1a..1108e63 100644 --- a/src/TapRating.js +++ b/src/TapRating.js @@ -1,5 +1,3 @@ -import _ from 'lodash'; - import React, { Component } from 'react'; import PropTypes from 'prop-types'; @@ -44,9 +42,7 @@ export default class TapRating extends Component { } renderStars(rating_array) { - return _.map(rating_array, (star, index) => { - return star - }) + return rating_array.map((star) => star) } starSelectedInPosition(position) { @@ -67,7 +63,7 @@ export default class TapRating extends Component { starContainerStyle.push(this.props.starContainerStyle); } - _.times(count, index => { + Array.apply(null, Array(count)).map((_, index) => ( rating_array.push( ) - }) + )) return (