Skip to main content

@std/ulid@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score76%
Published2 years ago (0.215.0)
function ulid
ulid(seedTime?: number): string

Generate a ULID, optionally based on a given timestamp.

Examples

Example 1

import { ulid } from "@std/ulid";
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

Return Type

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/ulid

Import symbol

import { ulid } from "@std/ulid";
or

Import directly with a jsr specifier

import { ulid } from "jsr:@std/ulid";