use ids instead of alphabets (index)
This commit is contained in:
@@ -8,3 +8,4 @@ export * from './src/math';
|
||||
export * from './src/slug';
|
||||
export * from './src/fill-series';
|
||||
export * from './src/url';
|
||||
export * from './src/id';
|
||||
|
||||
@@ -11,16 +11,17 @@
|
||||
"@openpanel/constants": "workspace:*",
|
||||
"date-fns": "^3.3.1",
|
||||
"mathjs": "^12.3.2",
|
||||
"nanoid": "^5.0.7",
|
||||
"ramda": "^0.29.1",
|
||||
"slugify": "^1.6.6",
|
||||
"superjson": "^1.13.3",
|
||||
"unique-names-generator": "^4.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openpanel/validation": "workspace:*",
|
||||
"@openpanel/eslint-config": "workspace:*",
|
||||
"@openpanel/prettier-config": "workspace:*",
|
||||
"@openpanel/tsconfig": "workspace:*",
|
||||
"@openpanel/validation": "workspace:*",
|
||||
"@types/node": "^18.16.0",
|
||||
"@types/ramda": "^0.29.6",
|
||||
"eslint": "^8.48.0",
|
||||
|
||||
5
packages/common/src/id.ts
Normal file
5
packages/common/src/id.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { nanoid } from 'nanoid/non-secure';
|
||||
|
||||
export function shortId() {
|
||||
return nanoid(4);
|
||||
}
|
||||
@@ -115,6 +115,22 @@ export const alphabetIds = [
|
||||
'H',
|
||||
'I',
|
||||
'J',
|
||||
'K',
|
||||
'L',
|
||||
'M',
|
||||
'N',
|
||||
'O',
|
||||
'P',
|
||||
'Q',
|
||||
'R',
|
||||
'S',
|
||||
'T',
|
||||
'U',
|
||||
'V',
|
||||
'W',
|
||||
'X',
|
||||
'Y',
|
||||
'Z',
|
||||
] as const;
|
||||
|
||||
export const deprecated_timeRanges = {
|
||||
|
||||
Reference in New Issue
Block a user