From ea8c27e7c154a80a118c610886550b20900a1580 Mon Sep 17 00:00:00 2001 From: King Date: Fri, 15 Dec 2017 02:35:30 -0500 Subject: [PATCH 1/2] add without.md --- snippets/without.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 snippets/without.md diff --git a/snippets/without.md b/snippets/without.md new file mode 100644 index 000000000..00876b5c9 --- /dev/null +++ b/snippets/without.md @@ -0,0 +1,12 @@ +### Without + +Use `Array.filter()` to create an array excluding all given values + +```js + +const without = (arr, ...args) => arr.filter(v => args.indexOf(v) === -1) + +// without[2, 1, 2, 3], 1, 2) -> [3] +// without([2, 1, 2, 3, 4, 5, 5, 5, 3, 2, 7, 7], 3, 1, 5, 2) -> [ 4, 7, 7 ] + +``` From 94096b9de4754a6917bf789db0f742df7815f6a6 Mon Sep 17 00:00:00 2001 From: King Date: Fri, 15 Dec 2017 02:37:19 -0500 Subject: [PATCH 2/2] ran npm run tagger & add array tag to DB --- tag_database | 1 + 1 file changed, 1 insertion(+) diff --git a/tag_database b/tag_database index b2535a484..937676886 100644 --- a/tag_database +++ b/tag_database @@ -85,3 +85,4 @@ UUID-generator:utility validate-email:utility validate-number:utility value-or-default:utility +without:array