Returns a random identifier of the form ${prefix}-${randomHex}.
${prefix}-${randomHex}
A stable prefix (e.g. a protocol or app name).
How many random bytes to append as hex; defaults to 8.
The prefixed random id.
1.0.3
import { randomId } from 'edgeport/util';const clientId = randomId('edgeport'); // e.g. 'edgeport-3f9a...' Copy
import { randomId } from 'edgeport/util';const clientId = randomId('edgeport'); // e.g. 'edgeport-3f9a...'
Returns a random identifier of the form
${prefix}-${randomHex}.