distributedlife-sequence
v1.0.1
Published
An increasing sequence of numbers. It'll escalate in linear time.
Downloads
16
Readme
sequence
Helps you manage a sequence. Starts with 1. Let's you track multiple sequences
Usage
require('distributedlife-sequence').next('my-key'); //1
require('distributedlife-sequence').next('my-key'); //2
require('distributedlife-sequence').next('different-key'); //1
You can check to see if a key is already in use. Can be useful for existing key clashes.
require('distributedlife-sequence').exists('my-key'); //true
require('distributedlife-sequence').exists('saturday'); //false