dead-simple-incrementer
v1.0.0
Published
Dead simple integer incrementer.
Downloads
11
Maintainers
Readme
Dead Simple Incrementer
No options, no fuss... Dead simple integer incrementer, which for example can be used as a naive id generator.
Installation
npm install dead-simple-incrementer
Usage
Create an incrementer, which will return an incremented integer with each call
to next()
. Incrementer starts with 1.
var inc = require('dead-simple-incrementer')();
inc.next(); // Returns 1
inc.next(); // Returns 2;
inc.next(); // Returns 3;
// ... and so on.
Test
Run unit tests;
$ npm test