Ananoid
Ananoid provides nano identifiers, an alternative to UUIDs. This project was
inspired by https://**g*ithub.com/ai/nanoid.
Overview
A nano identifier, or nanoid, is a randomly generated opaque value, suitable
for uniquely identifying database entries, file names, et cetera.
Ananoid (pronounced: \”an-an-oyd\”) is a library for generating such identifiers.
It uses cryptographically secure random number generation, and has no
dependencies beyond the dotnet 6 base class libraries. It has both a high-level
API, and a simpler, more memory-efficient, low-level API.
Recommended Reading
- Getting Started
- API Documentation
- CHANGELOG
Installation via NuGet
The latest version of this package can be installed from NuGet via the
following command:
> dotnet add package pblasucci.ananoid --version 1.1.0
Building from source
Prerequisites:
.NET SDK version 7, or higher (note, .NET 7 is required to build all
the projects in this repository. However, consuming the pblasucci.ananoid.dll
file only requires .NET 6).
Build steps:
- Clone this repo.
- From a command prompt, move into the root of th cloned repo.
- Restore the necessary tools (eg:
> dotnet tool restore). - Compile all project in the solution (eg:
> dotnet build). - Run the test suite (eg:
> dotnet test).
Preview the docs locally, with \”hot reload\”:
From a command prompt (assuming a basic build and test has worked), run the
following:
> dotnet fsdocs watch --port 2023 --input ./docSrc/ \\
--properties Configuration=Release \\
--sourcerepo https://**github.c*om/pblasucci/ananoid
Shout Outs!
Special thanks goes out to TheAngryByrd for doing all the dirty work
around the mechanics of HTML layout / theming, which he then — graciously —
made available under MIT License.This repository\’s documentation would look much uglier without his efforts.
Copyright
The library is available under the Mozilla Public License, Version 2.0.
For more information see the project\’s License file.
