Skip to content

isWellFormedDeviceCode

View as Markdown
function isWellFormedDeviceCode(code): boolean;

Defined in: react/src/hooks.ts:464

Whether a code that arrived in a link has the exact shape the CLI prints (ABCD-EFGH or ABCDEFGH, after trimming). Anything else (extra dashes, spaces, other characters) is refused without a lookup: a padded code could put other characters where the hidden last 4 should be.

Parameter Type
code string

boolean