You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
373 B

4 years ago
  1. 'use strict';
  2. var extractValues = require('../helpers/values');
  3. var nestedValue = require('../helpers/nestedValue');
  4. module.exports = function whereNotIn(key, values) {
  5. var items = extractValues(values);
  6. var collection = this.items.filter(function (item) {
  7. return items.indexOf(nestedValue(item, key)) === -1;
  8. });
  9. return new this.constructor(collection);
  10. };