0.0.4 • Published 3 years ago

ulid-to-hex v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

ULID to HEX

May be useful if you are storing ULIDs in binary format, and your database CLI already supports querying by HEX values.

Usage

Parse ULID

npx ulid-to-hex 01FCB79DXEHPQJRD8BWC6G7PVH
> 0x017B1674B7AE8DAF2C350BE30D03DB71
> 017b1674-b7ae-8daf-2c35-0be30d03db71

Parse HEX

npx ulid-to-hex 0x017B1674B7AE8DAF2C350BE30D03DB71
> 01FCB79DXEHPQJRD8BWC6G7PVH
> 017b1674-b7ae-8daf-2c35-0be30d03db71

Parse UUID

npx ulid-to-hex 017b1674-b7ae-8daf-2c35-0be30d03db71
> 0x017B1674B7AE8DAF2C350BE30D03DB71
> 01FCB79DXEHPQJRD8BWC6G7PVH

Flags

If you want just one value to be returned, you can use the flags --uuid or --ulid.

Example: Parse ULID to UUID only

npx ulid-to-hex 01FCB79DXEHPQJRD8BWC6G7PVH --uuid
> 017b1674-b7ae-8daf-2c35-0be30d03db71

Example: Parse HEX to ULID only

npx ulid-to-hex 0x017B1674B7AE8DAF2C350BE30D03DB71 --ulid
> 01FCB79DXEHPQJRD8BWC6G7PVH
0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago