File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
packages/interface-datastore Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 158
158
},
159
159
"dependencies" : {
160
160
"interface-store" : " ^5.0.0" ,
161
- "nanoid" : " ^5.0.3" ,
162
161
"uint8arrays" : " ^5.0.0"
163
162
},
164
163
"devDependencies" : {
Original file line number Diff line number Diff line change 1
- import { nanoid } from 'nanoid'
2
1
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
3
2
import { type SupportedEncodings , toString as uint8ArrayToString } from 'uint8arrays/to-string'
4
3
@@ -103,11 +102,11 @@ export class Key {
103
102
* @example
104
103
* ```js
105
104
* Key.random()
106
- * // => Key('/f98719ea086343f7b71f32ea9d9d521d ')
105
+ * // => Key('/344502982398 ')
107
106
* ```
108
107
*/
109
108
static random ( ) : Key {
110
- return new Key ( nanoid ( ) . replace ( / - / g , '' ) )
109
+ return new Key ( Math . random ( ) . toString ( ) . substring ( 2 ) )
111
110
}
112
111
113
112
/**
You can’t perform that action at this time.
0 commit comments