mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
24
react-app/node_modules/lodash/function/once.js
generated
vendored
Normal file
24
react-app/node_modules/lodash/function/once.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
var before = require('./before');
|
||||
|
||||
/**
|
||||
* Creates a function that is restricted to invoking `func` once. Repeat calls
|
||||
* to the function return the value of the first call. The `func` is invoked
|
||||
* with the `this` binding and arguments of the created function.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Function
|
||||
* @param {Function} func The function to restrict.
|
||||
* @returns {Function} Returns the new restricted function.
|
||||
* @example
|
||||
*
|
||||
* var initialize = _.once(createApplication);
|
||||
* initialize();
|
||||
* initialize();
|
||||
* // `initialize` invokes `createApplication` once
|
||||
*/
|
||||
function once(func) {
|
||||
return before(2, func);
|
||||
}
|
||||
|
||||
module.exports = once;
|
Reference in New Issue
Block a user