Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

always

v0.26.1arrow_drop_down
v0.26.1
STATUS
Passing
DOWNLOADS
54
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
698 B
subject
Returns a function that always returns the given value.
1 contributor
Use always in your project ?
Copied
npm i @bit/ramda.ramda.always
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
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';
revert changes
reload
toggle layout
maximize
t();
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.