mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
# add dist
This commit is contained in:
33
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/negate.js
generated
vendored
Normal file
33
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/negate.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/** Used as the `TypeError` message for "Functions" methods. */
|
||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||
|
||||
/**
|
||||
* Creates a function that negates the result of the predicate `func`. The
|
||||
* `func` predicate is invoked with the `this` binding and arguments of the
|
||||
* created function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Function
|
||||
* @param {Function} predicate The predicate to negate.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* function isEven(n) {
|
||||
* return n % 2 == 0;
|
||||
* }
|
||||
*
|
||||
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
||||
* // => [1, 3, 5]
|
||||
*/
|
||||
function negate(predicate) {
|
||||
if (typeof predicate != 'function') {
|
||||
throw new TypeError(FUNC_ERROR_TEXT);
|
||||
}
|
||||
return function() {
|
||||
return !predicate.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = negate;
|
Reference in New Issue
Block a user