UNPKG

@swell/cli

Version:

Swell's command line interface/utility

10 lines (9 loc) 339 B
/** * Mongo ObjectId shape — 24 hex chars, case-insensitive. The CLI accepts * either-case input (curl/jq users tend to lowercase, admin URLs sometimes * upper). All inspect grammars use the same pattern, so it lives here. */ export const HEX24 = /^[\da-f]{24}$/i; export function isObjectId(value) { return HEX24.test(value); }