JSPM

dead-simple-incrementer

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q48212F
  • License MIT

Dead simple integer incrementer.

Package Exports

  • dead-simple-incrementer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dead-simple-incrementer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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

License

MIT