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

Remove uuid dep, include a prefix in generated idempotency keys #671

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

rattrayalex-stripe
Copy link
Contributor

r? @richardm-stripe
cc @stripe/api-libraries @paulasjes-stripe @ob-stripe @brandur-stripe

I checked and this should be well within our idempotency key length limits.

@brandur-stripe
Copy link
Contributor

You have my vote! Was surprised to find out that the uuid package was that big.

* https://stackoverflow.com/a/2117523
*/
uuid4: () => {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cute, love it

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

Successfully merging this pull request may close these issues.

4 participants