pax_global_header00006660000000000000000000000064125720044740014517gustar00rootroot0000000000000052 comment=6bd52a02abfe184f58ceee8ab6d09e52e6418bf1 arr-exclude-1.0.0/000077500000000000000000000000001257200447400137305ustar00rootroot00000000000000arr-exclude-1.0.0/.editorconfig000066400000000000000000000003471257200447400164110ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [{package.json,*.yml}] indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false arr-exclude-1.0.0/.gitattributes000066400000000000000000000000141257200447400166160ustar00rootroot00000000000000* text=auto arr-exclude-1.0.0/.gitignore000066400000000000000000000000151257200447400157140ustar00rootroot00000000000000node_modules arr-exclude-1.0.0/.travis.yml000066400000000000000000000000741257200447400160420ustar00rootroot00000000000000language: node_js node_js: - 'iojs' - '0.12' - '0.10' arr-exclude-1.0.0/index.js000066400000000000000000000002721257200447400153760ustar00rootroot00000000000000'use strict'; module.exports = function (input, exclude) { if (!Array.isArray(input)) { return []; } return input.filter(function (x) { return exclude.indexOf(x) === -1; }); }; arr-exclude-1.0.0/license000066400000000000000000000021371257200447400153000ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. arr-exclude-1.0.0/package.json000066400000000000000000000011771257200447400162240ustar00rootroot00000000000000{ "name": "arr-exclude", "version": "1.0.0", "description": "Exclude certain items from an array", "license": "MIT", "repository": "sindresorhus/arr-exclude", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "array", "arr", "list", "exclude", "blacklist", "ignore", "without", "items", "elements", "values", "filter" ], "devDependencies": { "ava": "*", "xo": "*" } } arr-exclude-1.0.0/readme.md000066400000000000000000000010261257200447400155060ustar00rootroot00000000000000# arr-exclude [![Build Status](https://travis-ci.org/sindresorhus/arr-exclude.svg?branch=master)](https://travis-ci.org/sindresorhus/arr-exclude) > Exclude certain items from an array ## Install ``` $ npm install --save arr-exclude ``` ## Usage ```js var arrExclude = require('arr-exclude'); arrExclude(['a', 'b', 'c'], ['b']); //=> ['a', 'c'] ``` ## Related - [arr-include](https://github.com/sindresorhus/arr-include) - Include only certain items in an array ## License MIT © [Sindre Sorhus](http://sindresorhus.com) arr-exclude-1.0.0/test.js000066400000000000000000000002631257200447400152460ustar00rootroot00000000000000'use strict'; var test = require('ava'); var fn = require('./'); test(function (t) { t.same(fn(['a', 'b', 'c'], ['b']), ['a', 'c']); t.same(fn(null, ['a']), []); t.end(); });