COLLECTED BY
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
The Wayback Machine - https://web.archive.org/web/20201220221823/https://github.com/lodash/lodash/blob/master/once.js
Permalink
Cannot retrieve contributors at this time
23 lines (21 sloc)
631 Bytes
import before from './before.js'
/**
* Creates a function that is restricted to invoking `func` once. Repeat calls
* to the function return the value of the first invocation. The `func` is
* invoked with the `this` binding and arguments of the created function.
*
* @since 0.1.0
* @category Function
* @param {Function } func The function to restrict.
* @returns {Function } Returns the new restricted function.
* @example
*
* const initialize = once(createApplication)
* initialize()
* initialize()
* // => `createApplication` is invoked once
*/
function once ( func ) {
return before ( 2 , func )
}
export default once
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.