diff --git a/packages/interface-datastore/package.json b/packages/interface-datastore/package.json index 7832bf27..71c95aaf 100644 --- a/packages/interface-datastore/package.json +++ b/packages/interface-datastore/package.json @@ -158,7 +158,6 @@ }, "dependencies": { "interface-store": "^5.0.0", - "nanoid": "^5.0.3", "uint8arrays": "^5.0.0" }, "devDependencies": { diff --git a/packages/interface-datastore/src/key.ts b/packages/interface-datastore/src/key.ts index fcb546d0..6ef7ff69 100644 --- a/packages/interface-datastore/src/key.ts +++ b/packages/interface-datastore/src/key.ts @@ -1,4 +1,3 @@ -import { nanoid } from 'nanoid' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { type SupportedEncodings, toString as uint8ArrayToString } from 'uint8arrays/to-string' @@ -103,11 +102,11 @@ export class Key { * @example * ```js * Key.random() - * // => Key('/f98719ea086343f7b71f32ea9d9d521d') + * // => Key('/344502982398') * ``` */ static random (): Key { - return new Key(nanoid().replace(/-/g, '')) + return new Key(Math.random().toString().substring(2)) } /**