Page MenuHomeSealhub

shortid.ts
No OneTemporary

shortid.ts

import { Field } from "../../../main.js";
import shortid from "shortid";
export default class ShortID extends Field<string> {
typeName = "shortid";
hasIndex = async () => true;
async isProperValue() {
return Field.valid();
}
async encode(_: any, input: string | null) {
if (input === null) {
return null;
}
return input ? input : shortid.generate();
}
}

File Metadata

Mime Type
text/x-java
Expires
Mon, Jul 21, 00:18 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
784011
Default Alt Text
shortid.ts (375 B)

Event Timeline