Framework
encodeKey()
Function: encodeKey()
function encodeKey(namespace, key): stringEncode 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
| Parameter | Type | Description |
|---|---|---|
namespace | string[] | Namespace segments (can be empty) |
key | string | The key within the namespace |
Returns
string
Safe storage key
