Dead simple random path generator.
npm install @starefossen/rand-path --save
> var randPath = require('@starefossen/rand-path');
> randPath()
'wr/TB/s6'
> randPath(4)
'3J/P3/8K/y6'
> randPath(10, 3)
'6Szt/skob/vvay/ul23/6ceF/iX3O/ngU8/jKQU'
npm test
With the default alphabet of 62 characters, this random path generator has a
62^2n
(where n
is the depth of path) probability for a collision. With the
default depth of 3
that is 1
in 56,800,235,584
chance.