Skip to main content
Module

std/ulid/mod.ts>ulid

Deno standard library
Go to Latest
function ulid
import { ulid } from "https://deno.land/std@0.210.0/ulid/mod.ts";

Generate a ULID, optionally based on a given timestamp.

Examples

Example 1

import { ulid } from "https://deno.land/std@0.210.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