Downgraded lodash 3.10.1 (to align with Kibana)#359
Downgraded lodash 3.10.1 (to align with Kibana)#359uboness merged 1 commit intoelastic:masterfrom uboness:fix/lodash
Conversation
nreese
left a comment
There was a problem hiding this comment.
lgtm
Thanks for migrating to Kibana's version of lodash
cjcenizal
left a comment
There was a problem hiding this comment.
Looks good, but had a couple questions!
| @@ -1,5 +1,5 @@ | |||
| import React from 'react'; | |||
| import { isString } from 'lodash'; | |||
| import { isString } from '../../services/predicate'; | |||
There was a problem hiding this comment.
Can we export the predicates from the root modules, services?
There was a problem hiding this comment.
I can... thought about it... decided not to... but I can still do that.
Why decided not to? With generic services it somewhat feels off to export ALL possible utility functions under one module. the services sub-modules really don't have anything in common aside from the fact that they're all a bunch of utilities. To me it feels more appropriate to refer to the specific module when importing utilities.
But... that's my opinion... if you insist I can still export all to the higher services module
There was a problem hiding this comment.
I think you're right. In fact we should probably apply this pattern to the rest of the submodules under services.
| isDate, | ||
| isNumber, | ||
| isNaN, | ||
| } from 'lodash'; |
There was a problem hiding this comment.
Why not remove lodash entirely? Can we internalize these functions?
There was a problem hiding this comment.
we should... but it'll have to wait to a different pr... (there's more to this when it comes to removing lodash... we'll need to remove other usages as well - e.g. _.get)
- created a `predicate` module that exports all predicate function (e.g. `isString`, `isFunction`,...) - created `isNil` predicate - `sortable_properties` no longer uses lodash `sortBy` and uses our comparators instaed this change should enable using tables in Kibana.
- created a `predicate` module that exports all predicate function (e.g. `isString`, `isFunction`,...) - created `isNil` predicate - `sortable_properties` no longer uses lodash `sortBy` and uses our comparators instaed this change should enable using tables in Kibana.
predicatemodule that exports all predicate function (e.g.isString,isFunction,...)isNilpredicatesortable_propertiesno longer uses lodashsortByand uses our comparators instaedthis change should enable using tables in Kibana.