isWellFormedDeviceCode
View as Markdownfunction 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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
code |
string |
Returns
Section titled “Returns”boolean