empty

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
971 B
Returns the empty value of its argument's type.
1 contributor
Install empty as a package?
Copied
npm i @bit/justin-capalbo.ramda.empty
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
empty (
x:*
) : *

Returns the empty value of its argument’s type. Ramda defines the empty value of Array ([]), Object ({}), String (''), and Arguments. Other types are supported if they define <Type>.empty, <Type>.prototype.empty or implement the FantasyLand Monoid spec.

Dispatches to the empty method of the first argument, if present.

Example
R.empty(Just(42));      //=> Nothing()
     R.empty([1, 2, 3]);     //=> []
     R.empty('unicorns');    //=> ''
     R.empty({x: 1, y: 2});  //=> {}
Argument
x: *
Returns
*

Help and resources