Edit docs to have a note about -d:nulidInsecureRandom.

This commit is contained in:
Yu Vitaqua fer Chronos 2023-10-15 21:11:42 +01:00
parent 924c385154
commit 57daeacda6
3 changed files with 11 additions and 1 deletions

View file

@ -2,6 +2,9 @@
This is an implementation of the [ULID](https://github.com/ulid/spec)
spec in Nim!
## Compile Flags
`-d:nulidInsecureRandom`: Uses `std/random` instead of `std/sysrand`.
## Usage
```nim
let gen = NULIDGenerator()

View file

@ -1,6 +1,6 @@
# Package
version = "0.2.4"
version = "0.2.5"
author = "Yu Vitaqua fer Chronos"
description = "An implementation of ULID!"
license = "CC0"

View file

@ -18,6 +18,13 @@ when InsecureRandom:
else:
import std/sysrand
##[
Note: `--define:nulidInsecureRandom` can be passed to the compiler to make it
so that `std/random` is used instead of `std/sysrand`.
The JS backend and Nimscript use this by default (whether either work with NULID
is untested).
]##
type
NULID* = object
## An object representing a ULID.