Generate unique position that can be used to order items without renumbering them.
$ npm install --save stable-position
const { first, after, between } = require('stable-position');
const a = first();
const z = after(a);
const x = between(a, z);
const assert = require('assert');
assert(a < x && x < z);
returns a position value that is smaller than any other position
returns a position value that is smaller than the position represented by p
returns a position value that is bigger than the position represented by p
return position value that is between p and q
MIT © Damian Krzeminski