Generate random base62 strings quickly with better
statistical dispersion
than Math.random() unless Math.random is all that's available.
Largely based on uuid-random
yarn add base62-random
npm install base62-random
var base62 = require('base62-random'); base62(12); // 'KsykHbcCzUSL'
<script src="https://cdn.rawgit.com/deployable/base62-random/v0.3.5/base62-random.min.js"></script> <script> base62(13); // 'BAhl1V1BfUmo3' </script>
base62.test('5HXx8Eznu0'); // true base62.test('P-f6cA4e'); // false
MIT
- Based on jchook/uuid-random
- github deployable/base62-random
- npm base62-random