mirror of
https://github.com/cp6/my-idlers.git
synced 2025-04-20 18:18:36 +00:00
14 lines
No EOL
373 B
JavaScript
14 lines
No EOL
373 B
JavaScript
'use strict';
|
|
|
|
var extractValues = require('../helpers/values');
|
|
var nestedValue = require('../helpers/nestedValue');
|
|
|
|
module.exports = function whereNotIn(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);
|
|
}; |