A universally-unique, lexicographically-sortable, identifier generator
78
{
"context": "This criteria evaluates how well the engineer uses the ulid package's custom PRNG support to create deterministic, reproducible identifier generation. The focus is on properly implementing and utilizing custom pseudo-random number generators with the ulid package's generation functions.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Custom PRNG Implementation",
"description": "Implements a seeded pseudo-random number generator that returns consistent values between 0 and 1. The PRNG function should have the correct signature: () => number, compatible with ulid's PRNG parameter.",
"max_score": 25
},
{
"name": "Uses ulid Function",
"description": "Uses the ulid() function from the ulid package to generate identifiers. The function should be imported and called with appropriate parameters (seedTime and custom PRNG).",
"max_score": 20
},
{
"name": "Passes Custom PRNG",
"description": "Correctly passes the custom PRNG function as the second parameter to ulid(). The implementation should demonstrate understanding that ulid(seedTime, prng) accepts a custom PRNG function.",
"max_score": 25
},
{
"name": "Seed Reproducibility",
"description": "Ensures the same seed value produces the same PRNG sequence, resulting in identical ULIDs when generated with the same seed and timestamp. The seeded PRNG must be properly initialized for each generation.",
"max_score": 15
},
{
"name": "Uses isValid Function",
"description": "Uses the isValid() function from the ulid package to validate generated identifiers. The function should be imported and used to verify ULID correctness.",
"max_score": 10
},
{
"name": "Timestamp Handling",
"description": "Properly passes timestamp values as the first parameter to ulid(). For sequence generation, uses the specified fixed timestamp (1609459200000) consistently.",
"max_score": 5
}
]
}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