From 10f0da182ee8a44be4939ff38c4c37159a93d6a8 Mon Sep 17 00:00:00 2001 From: boryslevytskyi Date: Sat, 13 May 2017 21:21:02 +0300 Subject: [PATCH] Get rid of lodash --- package.json | 1 - src/app/expression.js | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index dfff64f..abf538b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "body-parser": "^1.15.2", - "lodash": "^4.17.2", "react": "^15.4.0", "react-dom": "^15.4.0" } diff --git a/src/app/expression.js b/src/app/expression.js index dac14c6..12208c9 100644 --- a/src/app/expression.js +++ b/src/app/expression.js @@ -1,5 +1,3 @@ -import * as _ from 'lodash'; - var expression = { factories:[], canParse: function(string) { @@ -240,7 +238,7 @@ export class ListOfNumbersExpression { constructor(expressionString, numbers) { this.expressionString = expressionString; this.numbers = numbers; - this.maxBitsLegnth = _.chain(numbers).map(n => n.lengthInBits).reduce((n , c) => n >= c ? n : c, 0).value(); + this.maxBitsLegnth = numbers.map(n => n.lengthInBits).reduce((n , c) => n >= c ? n : c, 0); } toString() {