append

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
875 B
Returns a new list containing the contents of the given list, followed by the given element.
1 contributor
Install append as a package?
Copied
npm i @bit/justin-capalbo.ramda.append
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
append (
el:*,
list:Array
) : Array

Returns a new list containing the contents of the given list, followed by the given element.

Example
R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']
     R.append('tests', []); //=> ['tests']
     R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]
Arguments
el: *

The element to add to the end of the new list.

list: Array

The list of elements to add a new item to. list.

Returns
Array

A new list containing the elements of the old list followed by `el`.

Help and resources