Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: convert ULID to UUID and vice versa #38

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

jvalerodev
Copy link
Contributor

Added functions to convert a ULID to a UUID, and vice versa.

For example:

const ULID = ulid(); // 01HHAGK730AEX50PA89H1ZG25T
const UUID = ULIDtoUUID(ULID); // 018c5509-9c60-53ba-5059-484c43f808ba
const toULID = UUIDtoULID(UUID); // 01HHAGK730AEX50PA89H1ZG25T

Solving the issue: #28

source/ulid.ts Outdated Show resolved Hide resolved
source/ulid.ts Outdated Show resolved Hide resolved
source/crockford.ts Outdated Show resolved Hide resolved
source/crockford.ts Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
@perry-mitchell perry-mitchell merged commit fc2ec64 into perry-mitchell:main Feb 5, 2024
@perry-mitchell
Copy link
Owner

I'll release this a bit later today..

@perry-mitchell
Copy link
Owner

Published under 2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants