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

don't want slash in UUID #2

Open
behrad opened this issue Oct 10, 2016 · 9 comments
Open

don't want slash in UUID #2

behrad opened this issue Oct 10, 2016 · 9 comments

Comments

@behrad
Copy link

behrad commented Oct 10, 2016

I don't want my uuids to have / inside.

Can the slash character in https://github.com/mcollina/hyperid/blob/master/hyperid.js#L30 be configurable? And am I ok to use any char I want?

@mcollina
Copy link
Owner

As long as that char is not part of the base64 subset, yes. If you want to send a PR, go ahead :D.

BTW, an hyperid is not a UUID.

@behrad
Copy link
Author

behrad commented Oct 10, 2016

As long as that char is not part of the base64 subset, yes

but you have used slash, and slash is a part of base64 subset!

@mcollina
Copy link
Owner

Ooh then we are grand even if it's part of the spec.

@delvedor
Copy link
Contributor

Closed in #4?

@mcollina
Copy link
Owner

@behrad can you check v1.2.0 if it's ok for you needs?

@cocobiz
Copy link

cocobiz commented Jan 13, 2020

As long as that char is not part of the base64 subset, yes. If you want to send a PR, go ahead :D.

BTW, an hyperid is not a UUID.

hi @mcollina what's the different between hyperid and UUID 😆

@osher
Copy link
Contributor

osher commented Apr 26, 2020

@cocobiz - the speed.
while randomizing and string manipulations are expansive - hyperid reuses a randomized base to an extent, and padding it with a running number. When a randomized base is "overused" - it's replaced.

@mcollina - we can support injectable maxInt as well...

@osher
Copy link
Contributor

osher commented Apr 26, 2020

@behrad - check the urlSafe option - which causes to use dash (-) instead of slash.

@mcollina
Copy link
Owner

we can support injectable maxInt as well...

It would be a nice PR.

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

No branches or pull requests

5 participants