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

consecutive

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consecutive - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

8

CHANGELOG.md
# consecutive changelog
## [5.0.3](http://github.com/ivanoff/create-raml/tree/5.0.3) (2017-04-19)
[Full Changelog](http://github.com/ivanoff/create-raml/compare/5.0.2...5.0.3)
**What Was Done:**
- add API information and example of usage
## [5.0.2](http://github.com/ivanoff/create-raml/tree/5.0.2) (2017-04-19)

@@ -4,0 +12,0 @@ [Full Changelog](http://github.com/ivanoff/create-raml/compare/5.0.2...5.0.2)

2

package.json
{
"name": "consecutive",
"version": "5.0.2",
"version": "5.0.3",
"description": "Consecutive numbering",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -31,5 +31,33 @@

//starts with 5
var begin = consecutive(5);
console.log(begin(), begin(), begin());
//=> 5 6 7
//base 2
var base2 = consecutive(null, 2);
console.log(base2(), base2(), base2());
//=> 0 1 10
//base 16, starts with 9ffa, step 3
var base16 = consecutive('9ffa', 16, 3);
console.log(base16(), base16(), base16());
//=> 9ffa 9ffd a000
```
## API
### consecutive(begin, base, step)
Returns a function that when called will return a consecutive number, counting on base and step.
name | optional | default value | description
------|----------|---------------|-------------
begin | yes | 0 | Number to start from
base | yes | 10 | An integer between 2 and 36 specifying the base to use for representing numeric values
step | yes | 1 | Number to increment
## Tests

@@ -36,0 +64,0 @@

Sorry, the diff of this file is not supported yet

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