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

ml-array-sequential-fill

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-array-sequential-fill

Create an array with sequential numbers

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
increased by675.98%
Maintainers
5
Weekly downloads
 
Created
Source

array-variance

NPM version npm download

Fill an array with sequential numbers or create a new array containing sequential numbers.

Installation

$ npm install --save ml-array-sequential-fill

Usage

import sequentialFill from 'ml-array-sequential-fill';

var array = sequentialFill({from:0, to:10, size: 6});

// array = [0,2,4,6,8,10]

// The following alternatives gives the same result
var array = sequentialFill(undefined, {from:0, to:10, size: 6});
var array = sequentialFill([], {from:0, to:10, size: 6});
var array = sequentialFill([1,2,3], {from:0, to:10, size: 6});
var array = sequentialFill({from:0, to:10, step: 2});

If you provide an array the array will be modified ! If you would like a new array you may provide as value 'undefined' or just skip this value.

License

MIT

FAQs

Package last updated on 30 Aug 2019

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