mol_key
TypeScript icon, indicating that this package has built-in type declarations

0.0.891 • Public • Published

$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

1KB

import { $mol_key as key } from 'mol_key'

// {"regexp":"/foo/","elems":["04Y7LLST","XMSPWAKY"]}
key({ regexp: /foo/, elems: [ document.head, document.body ] })

Readme

Keywords

Package Sidebar

Install

npm i mol_key

Weekly Downloads

479

Version

0.0.891

License

none

Unpacked Size

435 kB

Total Files

26

Last publish

Collaborators

  • jin