From c2e320500b48edbd3e54d3e5bb42d2d9f31ce788 Mon Sep 17 00:00:00 2001 From: King Date: Wed, 20 Dec 2017 22:47:54 -0500 Subject: [PATCH] ran npm run builder --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3cabfac7..25b7dbfd0 100644 --- a/README.md +++ b/README.md @@ -550,8 +550,10 @@ _(For a snippet that does not mutate the original array see [`without`](#without ```js const pull = (arr, ...args) => { - let pulled = arr.filter((v, i) => !args.toString().split(',').includes(v)); - arr.length = 0; pulled.forEach(v => arr.push(v)); + let argState = Array.isArray(args[0]) ? args[0] : args; + let pulled = arr.filter((v, i) => !argState.includes(v)); + arr.length = 0; + pulled.forEach(v => arr.push(v)); }; // let myArray1 = ['a', 'b', 'c', 'a', 'b', 'c'];