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

Unique id for each block - fix generate nanoid #1585

Closed
wants to merge 3 commits into from

Conversation

wtmaxim
Copy link

@wtmaxim wtmaxim commented Mar 7, 2021

We need a unique id for each block to editing documents collaboratively.

This PR is modified and resubmitted based on this #1493 to replace uuidv4 with nanoid

@wtmaxim wtmaxim changed the title Pr/generate nanoid Fix generate nanoid Mar 7, 2021
@wtmaxim wtmaxim changed the title Fix generate nanoid Unique id for each block - fix generate nanoid Mar 7, 2021
* @param t Number to fill array
* @returns {string} Id with t characters
*/
function nanoid(t = 21): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

@neSpecc
Would you like to use the original npm library?
https://www.npmjs.com/package/nanoid

@gohabereg
Copy link
Member

Closing due more relevant #1667

@gohabereg gohabereg closed this Apr 25, 2021
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.

None yet

4 participants