Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/ulid/mod.ts>ulid

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
function ulid
import { ulid } from "https://deno.land/std@0.224.0/ulid/mod.ts";

Generate a ULID, optionally based on a given timestamp.

Examples

Example 1

import { ulid } from "https://deno.land/std@0.224.0/ulid/mod.ts";
ulid(); // 01ARZ3NDEKTSV4RRFFQ69G5FAV

// You can also input a seed time which will consistently give you the same string for the time component
ulid(1469918176385); // 01ARYZ6S41TSV4RRFFQ69G5FAV

Parameters

optional
seedTime: number = [UNSUPPORTED]

Returns

string