LogoRobo.js
Framework

encodeKey()

Function: encodeKey()

function encodeKey(namespace, key): string

Encode a (namespace, key) pair into a safe storage key.

If the composed key contains only safe characters, it's stored as-is. Otherwise, it's encoded as _e:{base64url} where the payload is JSON.

Parameters

ParameterTypeDescription
namespacestring[]Namespace segments (can be empty)
keystringThe key within the namespace

Returns

string

Safe storage key

On this page