Merge branch 'master' into TopbarPluginWithSelect

This commit is contained in:
Ron
2017-06-22 15:02:30 -07:00
committed by GitHub
6 changed files with 52 additions and 44 deletions

View File

@@ -3,6 +3,7 @@ import Im from "immutable"
import camelCase from "lodash/camelCase"
import upperFirst from "lodash/upperFirst"
import _memoize from "lodash/memoize"
import find from "lodash/find"
import some from "lodash/some"
import eq from "lodash/eq"
import { memoizedSampleFromSchema, memoizedCreateXMLExample } from "core/plugins/samples/fn"
@@ -587,3 +588,10 @@ export const filterConfigs = (configs, allowed) => {
return filteredConfigs
}
// Is this really required as a helper? Perhaps. TODO: expose the system of presets.apis in docs, so we know what is supported
export const shallowEqualKeys = (a,b, keys) => {
return !!find(keys, (key) => {
return eq(a[key], b[key])
})
}