redis-json
Version:
A wrapper library to store JSON Objects in redis-hashsets and retrieve it back as JSON objects
20 lines (19 loc) • 547 B
TypeScript
/**
* Return the given key if it's a string else
* parses it into number
*
* @param key
*
* @returns a string if it cannot be parsed to a number
* else returns the parsed number
*/
export declare function parseKey(key: string): string | number;
/**
* Encapsulate '.' in the given key, such
* that a '.' in the key is NOT misinterpreted
* during unflattening of the object
*
* @param key
*/
export declare function encodeKey(key: string): string;
export declare const splitKey: (key: string) => string[];