ui
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var extractValues = require('../helpers/values');
|
||||
var nestedValue = require('../helpers/nestedValue');
|
||||
|
||||
module.exports = function whereIn(key, values) {
|
||||
var items = extractValues(values);
|
||||
|
||||
var collection = this.items.filter(function (item) {
|
||||
return items.indexOf(nestedValue(item, key)) !== -1;
|
||||
});
|
||||
|
||||
return new this.constructor(collection);
|
||||
};
|
||||
Reference in New Issue
Block a user