Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-append-until

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-append-until

Add one element to the end of an array returning the new array without mutating source array.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

array-append-until

Add one element to the end of an array returning the new array without mutating source array.

Build Status Code Climate js-standard-style

npm install array-append-until --save

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

npm stats

npm NPM downloads Dependency Status

API Example

Static
var appendUntil = require('array-append-until')
appendUntil('Z', (list) => list.length === 2)
//=> ['Z', 'Z']
Generator
var appendUntil = require('array-append-until')
appendUntil((list) => list.pop() + 5, (list) => list.length === 3, [0])
//=> [ 0, 5, 10 ]

API

appendUntil(element, predicate, list)

arguments
  • element (*|Function).
  • predicate (Function).
  • list (Array).
returns
  • (Array) New array with element (or value returned from applying list to element function) appended.

Alternatives

  • N/A

Contributing

SEE: contributing.md

Licenses

GitHub license

Keywords

FAQs

Package last updated on 08 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc