Narcissistic Passion Minified
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

array-concat

0.1.1 • Public • Published

array-concat

Returns a new array comprised of the given array's contents with the given value appended.

Build Status Code Climate js-standard-style

npm install array-concat --save

You can also use Duo, Bower or download the files manually.

npm stats

npm NPM downloads David

Overview

Returns a new array comprised of the given array's contents with the given value appended. Pass an array as the second argument to append multiple values.

API Example

Pointful
var concat = require('array-concat')
concat(['a', 'b'], ['c', 'd'])
//=> ['a', 'b', 'c', 'd']
Pointfree Style
var concat = require('array-concat')
var list = [['b'], ['c'], ['d']]
 
list.map(concat(['a']))
//=> [['a', 'b'], ['a', 'c'], ['a', 'd']]

API

concat(list, value)

arguments
  • list (array).
  • value (any).
returns
  • (array) Returns an array comprised of the given array's contents with the given value(s) appended.

Related

Alternatives

Contributing

SEE: contributing.md

Licenses

GitHub license

install

npm i array-concat

Downloadsweekly downloads

47

version

0.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability