always

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
7
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
689 B
Returns a function that always returns the given value.
1 contributor
Install always as a package?
Copied
npm i @bit/justin-capalbo.ramda.always
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
always (
val:*
) : Function

Returns a function that always returns the given value. Note that for non-primitives the value returned is a reference to the original value.

This function is known as const, constant, or K (for K combinator) in other languages and libraries.

Example
const t = R.always('Tee');
     t(); //=> 'Tee'
Argument
val: *

The value to wrap in a function

Returns
Function

A Function :: * -> val.

Help and resources