@nodescript/core
Version:
Visual programming language for Browser and Node
11 lines • 468 B
JavaScript
import { Schema } from 'airtight';
import { customAlphabet } from 'nanoid';
export const shortId = customAlphabet('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 8);
export const standardId = customAlphabet('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 16);
export const IdSchema = new Schema({
id: 'Id',
type: 'string',
regex: '^[a-zA-Z0-9._-]{1,64}$',
default: () => shortId(),
});
//# sourceMappingURL=id.js.map