mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Use more ES2015.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user