mol_key
v0.0.1047
Published
Returns string key for any value.
Downloads
1,113
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_key
applying ([123,{"foo":"A1B2C3D4"}]
,{"foo":[123,"A1B2C3D4"]}"
). - Result of
toJSON
calling is returned for objects with this method. - GUID generated/reused for other objects (
"A1B2C3D4"
).
NPM Usage
npm install mol_key
import { $mol_key as key } from 'mol_key'
// {"regexp":"/foo/","elems":["04Y7LLST","XMSPWAKY"]}
key({ regexp: /foo/, elems: [ document.head, document.body ] })