Socket
Socket
Sign inDemoInstall

iota-array

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    iota-array

Generates an array of consecutive integers starting at 0


Version published
Weekly downloads
450K
decreased by-9.01%
Maintainers
1
Install size
3.38 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 28 Apr 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc