New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iota-array

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iota-array

Generates an array of consecutive integers starting at 0

1.0.0
latest
Source
npm
Version published
Weekly downloads
478K
-0.33%
Maintainers
1
Weekly downloads
 
Created
Source

iota-array

Fills an array with sequential integers. Just like C++'s std::iota() or the similarly named function in APL.

Install

npm install iota-array

Example


console.log(require("iota-array")(3))

//Prints:
//
//    [0,1,2]
//

require("iota-array")(n)

Constructs an array of length n of n sequential integers starting from 0.

  • n the length of the array to construct

Returns: An array of n sequential integers starting at 0

Credits

(c) 2013 Mikola Lysenko. MIT License

Keywords

iota

FAQs

Package last updated on 28 Apr 2014

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