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

append

v0.26.1arrow_drop_down
v0.26.1
STATUS
Passing
DOWNLOADS
32
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
882 B
subject
Returns a new list containing the contents of the given list, followed by the given element.
1 contributor
Use append in your project ?
Copied
npm i @bit/ramda.ramda.append
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
append("tests", ["write", "more"]);
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`.