Use more ES2015.

This commit is contained in:
John-David Dalton
2017-01-02 16:45:31 -06:00
parent 2900cfd288
commit 1a1e462f80
17 changed files with 45 additions and 59 deletions

View File

@@ -1,5 +1,4 @@
import baseDifference from './_baseDifference.js';
import baseRest from './_baseRest.js';
import isArrayLikeObject from './isArrayLikeObject.js';
/**
@@ -22,10 +21,7 @@ import isArrayLikeObject from './isArrayLikeObject.js';
* _.without([2, 1, 2, 3], 1, 2);
* // => [3]
*/
var without = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, values)
: [];
});
const without = (array, ...values) =>
isArrayLikeObject(array) ? baseDifference(array, values) : [];
export default without;