consecutive
Advanced tools
Comparing version 5.0.2 to 5.0.3
# 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) |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15769
97