mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Remove semicolons.
This commit is contained in:
12
negate.js
12
negate.js
@@ -10,19 +10,19 @@
|
||||
* @example
|
||||
*
|
||||
* function isEven(n) {
|
||||
* return n % 2 == 0;
|
||||
* return n % 2 == 0
|
||||
* }
|
||||
*
|
||||
* filter([1, 2, 3, 4, 5, 6], negate(isEven));
|
||||
* filter([1, 2, 3, 4, 5, 6], negate(isEven))
|
||||
* // => [1, 3, 5]
|
||||
*/
|
||||
function negate(predicate) {
|
||||
if (typeof predicate != 'function') {
|
||||
throw new TypeError('Expected a function');
|
||||
throw new TypeError('Expected a function')
|
||||
}
|
||||
return function(...args) {
|
||||
return !predicate.apply(this, args);
|
||||
};
|
||||
return !predicate.apply(this, args)
|
||||
}
|
||||
}
|
||||
|
||||
export default negate;
|
||||
export default negate
|
||||
|
||||
Reference in New Issue
Block a user