param key returns export function parseKey ( key ) { const numKey = Number ( key ) ; return isNaN ( numKey ) || isHex ( key ) ? decodeKey ( key ) : numKey ; } param key export function encodeKey ( key ) { return key . replace ( /\./g , '/.' ) ; } param key function decodeKey ( key ) { return key ? key . replace ( /\/\./g , '.' ) : key ; } export const splitKey = ( ( ) => { const keySplitReg = /(?<!\/)\./ ; param key return ( key ) : string [ ] => { return key . split ( keySplitReg ) ; } ; } ) ( ) ; param key function isHex ( key ) { return key ? Boolean ( key . match ( /^0x[0-9a-f]+$/i ) ) : false ; }