Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gulp/tasks/lodash.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(gulp) {
const shell = require('gulp-shell');

const configs = {
include: ['cloneDeep', 'cloneDeepWith', 'get', 'has', 'isEmpty', 'isEqual', 'isNull', 'isPlainObject', 'isObject', 'merge', 'mergeWith', 'omit', 'reject', 'find'],
include: ['cloneDeep', 'cloneDeepWith', 'find', 'get', 'has', 'includes', 'isEmpty', 'isEqual', 'isNull', 'isPlainObject', 'isObject', 'merge', 'mergeWith', 'omit', 'reject'],
output: 'custom-lodash.js'
};

Expand Down
3 changes: 2 additions & 1 deletion src/utils/dataMatchesContraints.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ governing permissions and limitations under the License.

const _ = require('../../custom-lodash');
const find = _.find;
const includes = _.includes;

module.exports = function(data, constraints) {
// Go through all constraints and find one which does not match the data
Expand All @@ -22,7 +23,7 @@ module.exports = function(data, constraints) {
const value = data[key];
const valueType = typeof value;
const incorrectType = type && valueType !== type;
const noMatchForSupportedValues = supportedValues && !supportedValues.includes(value);
const noMatchForSupportedValues = supportedValues && !includes(supportedValues, value);
if (mandatory) {
return !value || incorrectType || noMatchForSupportedValues;
} else {
Expand Down