1 contributor
Like
Install once as a package?
Copied
npm i @bit/justin-capalbo.ramda.once
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
once (
fn:
) : Function
Function
Accepts a function fn
and returns a function that guards invocation of
fn
such that fn
can only ever be called once, no matter how many times
the returned function is invoked. The first value calculated is returned in
subsequent invocations.
Example
Argument
fn:
Function
The function to wrap in a call-only-once wrapper.
Returns
Function
The wrapped function.