Header menu logo ananoid

Tagged Module

Contains primitives for generating identifiers which are "tagged" with a discriminator (useful for managing lots of string which have different purposes, but where using a full CLR type is undesirable).

This module is not intended for languages other than F#.

Types

Type Description

nanoid

A "tag", which can be used as a discriminator.

string<'Tag>

An abbreviation for the CLI type System.String.

Functions and values

Function or value Description

nanoId' ()

Full Usage: nanoId' ()

Parameters:
    () : unit

Returns: string<MeasureProduct<nanoid, MeasureOne>>

Generates a new tagged identifier with the default alphabet and size.

This function is not intended for languages other than F#.

() : unit
Returns: string<MeasureProduct<nanoid, MeasureOne>>

nanoIdOf' alphabet size

Full Usage: nanoIdOf' alphabet size

Parameters:
    alphabet : string
    size : int

Returns: string<MeasureProduct<nanoid, MeasureOne>>

Generates a new tagged identifier, size characters in length, derived from the letters of the given alphabet (note: a size of less than one will result in an empty string).

This function is not intended for languages other than F#.

alphabet : string
size : int
Returns: string<MeasureProduct<nanoid, MeasureOne>>
ArgumentOutOfRangeException Thrown when alphabet contains < 1 letter, or > 255 letters.

Type something to start searching.