UNPKG

@bugsnag/cuid

Version:

Collision-resistant ids optimized for horizontal scaling and performance. For node and browsers.

13 lines (10 loc) 240 B
'use strict'; /** * Check the provided value is a valid device id * @param {unknown} value * @returns */ function isCuid (value) { return typeof value === 'string' && (/^c[a-z0-9]{20,32}$/).test(value); } module.exports = isCuid;