mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 17:53:59 +02:00
revert uid generation, but increase randomness
This commit is contained in:
@@ -18,7 +18,8 @@
|
|||||||
"keycode": "^2.1.2",
|
"keycode": "^2.1.2",
|
||||||
"lodash": "^4.13.1",
|
"lodash": "^4.13.1",
|
||||||
"type-of": "^2.0.1",
|
"type-of": "^2.0.1",
|
||||||
"ua-parser-js": "^0.7.10"
|
"ua-parser-js": "^0.7.10",
|
||||||
|
"uid": "0.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^0.14.0 || ^15.0.0",
|
"react": "^0.14.0 || ^15.0.0",
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
let N = 0
|
import generate from 'uid'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a unique identifier.
|
* Create a unique identifier.
|
||||||
@@ -8,7 +8,7 @@ let N = 0
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function uid() {
|
function uid() {
|
||||||
return String(N++)
|
return generate(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user