Function isNil

  • Determines whether the UUID is the nil UUID.

    Parameters

    • id: string

      UUID value.

    Returns boolean

    true if the UUID is the nil UUID, otherwise false.

    import { isNil } from "@std/uuid";
    import { assert, assertFalse } from "@std/assert";

    assert(isNil("00000000-0000-0000-0000-000000000000"));
    assertFalse(isNil(crypto.randomUUID()));