A universally-unique, lexicographically-sortable, identifier generator
78
{
"context": "This criteria evaluates how well the engineer uses the ulid package's monotonicFactory function to create an ordered ID generator that maintains strict lexicographic ordering, even when multiple IDs are generated within the same millisecond.",
"type": "weighted_checklist",
"checklist": [
{
"name": "monotonicFactory usage",
"description": "Uses the monotonicFactory() function from the ulid package to create the ID generator",
"max_score": 40
},
{
"name": "Factory return",
"description": "Returns the factory function created by monotonicFactory() from createOrderedIdGenerator(), not wrapping it unnecessarily",
"max_score": 20
},
{
"name": "Timestamp parameter",
"description": "Correctly passes the optional timestamp parameter from IdGenerator to the factory function returned by monotonicFactory()",
"max_score": 20
},
{
"name": "Import statement",
"description": "Imports monotonicFactory from the 'ulid' package correctly",
"max_score": 10
},
{
"name": "Type definitions",
"description": "Exports the IdGenerator type as specified in the API, defining it as (timestamp?: number) => string",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-ulidevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10