mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Remove noop.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import Set from './_Set.js';
|
||||
import noop from './noop.js';
|
||||
import setToArray from './_setToArray.js';
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
@@ -12,6 +11,8 @@ const INFINITY = 1 / 0;
|
||||
* @param {Array} values The values to add to the set.
|
||||
* @returns {Object} Returns the new set.
|
||||
*/
|
||||
const createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : values => new Set(values);
|
||||
const createSet = (Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY)
|
||||
? values => new Set(values)
|
||||
: () => {};
|
||||
|
||||
export default createSet;
|
||||
|
||||
Reference in New Issue
Block a user