mol_key
v0.0.1458
Published
Returns string key for any value.
Readme
$mol_key
Returns string key for any value.
- Primitives are returned as JSON (
true,12.34). - POJO's are returned as JSON with recursive
$mol_keyapplying ([123,{"foo":"A1B2C3D4"}],{"foo":[123,"A1B2C3D4"]}"). - Result of
toJSONcalling is returned for objects with this method. - GUID generated/reused for other objects (
"A1B2C3D4").
NPM Usage
npm install mol_keyimport { $mol_key as key } from 'mol_key'
// {"regexp":"/foo/","elems":["04Y7LLST","XMSPWAKY"]}
key({ regexp: /foo/, elems: [ document.head, document.body ] })