mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-30 22:49:03 +02:00
♻️ Move nanoid to utils package (#1430)
This commit is contained in:
parent
d55131c2ab
commit
0fc7d0a0c8
12 changed files with 371 additions and 439 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "@rallly/utils",
|
||||
"type": "module",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -8,6 +9,9 @@
|
|||
"exports": {
|
||||
"./*": "./src/*.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"nanoid": "^5.0.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^2.1.1"
|
||||
}
|
||||
|
|
13
packages/utils/src/nanoid.ts
Normal file
13
packages/utils/src/nanoid.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { customAlphabet } from "nanoid";
|
||||
|
||||
export const nanoid = customAlphabet(
|
||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||
12,
|
||||
);
|
||||
|
||||
export const randomid = customAlphabet(
|
||||
"0123456789abcdefghijklmnopqrstuvwxyz",
|
||||
12,
|
||||
);
|
||||
|
||||
export const generateOtp = customAlphabet("0123456789", 6);
|
|
@ -2,6 +2,6 @@
|
|||
"compilerOptions": {
|
||||
"types": ["vitest/globals"],
|
||||
},
|
||||
"extends": "@rallly/tsconfig/react.json",
|
||||
"extends": "@rallly/tsconfig/base.json",
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue