MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / shortId

Function shortId

packages/common/src/id.ts:3–5  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { nanoid } from 'nanoid/non-secure';
2
3export function shortId() {
4 return nanoid(4);
5}
6
7export function generateId(prefix?: string, length?: number) {
8 return prefix ? `${prefix}_${nanoid(length ?? 8)}` : nanoid(length ?? 8);

Callers 6

upFunction · 0.90
addFilterFunction · 0.90
reportSlice.tsFile · 0.90
ReportSeriesItemFunction · 0.90
ReportGlobalFiltersFunction · 0.90
EventFieldFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected