iota-array

1.0.0last stable release 11 years ago
Complexity Score
Low
Open Issues
N/A
Dependent Projects
35
Weekly Downloadsglobal
536,864

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

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

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
3.00
Test Coverage
No Data
Follows Semver
Yes
Github Stars
8
Dependenciestotal
1
DependenciesOutdated
1
DependenciesDeprecated
0
Threat Modelling
No Data
Repo Audits
No Data

Learn how to distribute iota-array in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install iota-array
Processing...
Done

Releases

Loading Version Data
NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.