A simple caching id generation utility.
import Ids from 'ids';
const ids = new Ids();
const next = ids.next(); // returns id
ids.claim('f71a81'); // claim id as already existing
ids.assigned('f71a81'); // true if id was already generated / claimed
Fetch it via npm:
npm install --save ids
Use under the terms of the MIT license.