This library can be used to generate [nanoids][nanoid] in elm, which can be more URL friendly than UUIDs.
Creates a nanoid from a given list of integers. Generally you want to create
a randomness pool in JS using something like Array.from(crypto.getRandomValues(new Uint8Array(21*21*7))).
See the examples on how to do this properly. Most nanoids consist of 21 bytes.
nanoid [ 0, 1, 2 ] == "abc"The length of the pool determines the length of the output.
Generate nanoids using the standard values and elm/random
import Random
import Nanoid exposing (Nanoid)
Random.step Nanoid.generator (Random.initialSeed 0) == "qBrbY8E1PkuPSRjijxsab"Generate a nanoid using a custom charmap.
import Array
nanoidWithOptions (Array.fromList ['a', 'b', 'c', 'd']) [1, 2, 3] == "abc"Construct a nanoid. Useful since nanoids are customizable with alphabets & sizes.
Nanoid type. Represents a generated nanoid.