{"name":"orderedmap","version":"1.1.8","description":"Persistent ordered mapping from strings","type":"module","main":"dist/index-cjs.cjs","types":"dist/index-cjs.d.ts","module":"dist/index-es.js","exports":{"import":"./dist/index-es.js","require":"./dist/index-cjs.cjs"},"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/marijnh/orderedmap.git"},"keywords":["persistent","map"],"author":{"name":"Marijn Haverbeke","email":"marijnh@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/marijnh/orderedmap/issues"},"homepage":"https://github.com/marijnh/orderedmap#readme","scripts":{"build":"rollup -c","watch":"rollup -c -w","prepare":"npm run build"},"devDependencies":{"rollup":"^1.26.3"},"gitHead":"327498c2f4dc30ecc3d2bcf9e2e893b85a3a458c","_id":"orderedmap@1.1.8","_nodeVersion":"16.13.1","_npmVersion":"8.10.0","dist":{"integrity":"sha512-eWEYOAggZZpZbJ9CTsqAKOTxlbBHdHZ8pzcfEvNTxGrjQ/m+Q25nSWUiMlT9MTbgpB6FOiBDKqsgJ2FlLDVNaw==","shasum":"9652b2584f721c1032fa04cb60d442b3d4aa097c","tarball":"http://registry-npm.ywwl.com/orderedmap/download/orderedmap-1.1.8.tgz","fileCount":7,"unpackedSize":14258,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuoaVvtUkByjMrtgDCRTS1OOpK3JoHKbXfdsGTgonN6AIhAOT/eXjo1hovHtee/CRDJ1mMv+6Hz5/X0kcx+I35IaUn"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilzKKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDSQ/9FUj/WOtLc/DP38mhbGbUH7AgXD5F4kLV/GwU4m/QPFjPY6PR\r\nLNVhWZvWGh//jyvOxjBpV9eQZ78ODU1W6AIIsvOYunQ44cknCpC68T/IitjO\r\ng0yd6IvIYBg+qMcGLFXIpE/hUQqBQZjQ2rj3NwBd4XFlAGg8d92/k5puHysn\r\nkOBXVgO/lB3iE8mdGg5z6r6d9qBYpVu/cCjeq5/sRFFHF7wpmIC0CaXHs+I/\r\nRkTeRQsAUXHnNuI6TwMfv5KCMFBJqMIRtPXlynfo921vXHJeDvsPuQC+ZvPf\r\niAqNrgLuFIwjfCq9eI04DArlaqfKsENAOI7EnBApQ6+va3MZ6NXwclwdcivn\r\nSvIUqHlnP77KDOV70qg9B4J+wXjQqJ8uk+0E6M7VF9zUoEajkA1ZvJDiwY68\r\nFFC6MZnkhu+hyooVKg+vyXQO2arWCh/NCh9AYrZj0TEZZ+sUZuEUTPtfofzr\r\nGHBmmvvj6qSdoX1qpqqo+vVaZDE7onomZPv2SwwvpBaZRAOx3zjoLPCil7Wo\r\nyoMMckEkWHZEYo0EuOUXCbYxJ3Q2ITTo+V8zgDnCiflf4lhsbH8Vzd74kn2U\r\nvFjkGKIUA5nV0goeJv+Ro5TqRDppeftOVxepweK2vRBJyAWOrSht8qhGjeLc\r\nHYKRF0ZWOngb+zVvogzzEAUfO+CUvDoQ1hg=\r\n=fbWc\r\n-----END PGP SIGNATURE-----\r\n","size":3228,"noattachment":false,"key":"/orderedmap/-/orderedmap-1.1.8.tgz"},"_npmUser":{"name":"marijn","email":"marijnh@gmail.com"},"directories":{},"maintainers":[{"name":"marijn","email":"marijnh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/orderedmap_1.1.8_1654076041840_0.09672601502034617"},"_hasShrinkwrap":false,"readme":"# OrderedMap\n\nPersistent data structure representing an ordered mapping from strings\nto values, with some convenient update methods.\n\nThis is not an efficient data structure for large maps, just a minimal\nhelper for cleanly creating and managing small maps in a way that\nmakes their key order explicit and easy to think about.\n\nLicense: MIT\n\n## Reference\n\nThe exported value from this module is the class `OrderedMap`,\ninstances of which represent a mapping from strings to arbitrary\nvalues.\n\n**`OrderedMap.from`**`(value: ?Object | OrderedMap) → OrderedMap`  \nReturn a map with the given content. If null, create an empty map. If\ngiven an ordered map, return that map itself. If given an object,\ncreate a map from the object's properties.\n\n### Methods\n\nInstances of `OrderedMap` have the following methods and properties:\n\n**`get`**`(key: string) → ?any`  \nRetrieve the value stored under `key`, or return undefined when\nno such key exists.\n\n**`update`**`(key: string, value: any, newKey: ?string) → OrderedMap`  \nCreate a new map by replacing the value of `key` with a new\nvalue, or adding a binding to the end of the map. If `newKey` is\ngiven, the key of the binding will be replaced with that key.\n\n**`remove`**`(key: string) → OrderedMap`  \nReturn a map with the given key removed, if it existed.\n\n**`addToStart`**`(key: string, value: any) → OrderedMap`  \nAdd a new key to the start of the map.\n\n**`addToEnd`**`(key: string, value: any) → OrderedMap`  \nAdd a new key to the end of the map.\n\n**`addBefore`**`(place: string, key: value: string, value: any) → OrderedMap`  \nAdd a key after the given key. If `place` is not found, the new\nkey is added to the end.\n\n**`forEach`**`(f: (key: string, value: any))`  \nCall the given function for each key/value pair in the map, in\norder.\n\n**`prepend`**`(map: Object | OrderedMap) → OrderedMap`  \nCreate a new map by prepending the keys in this map that don't\nappear in `map` before the keys in `map`.\n\n**`append`**`(map: Object | OrderedMap) → OrderedMap`  \nCreate a new map by appending the keys in this map that don't\nappear in `map` after the keys in `map`.\n\n**`subtract`**`(map: Object | OrderedMap) → OrderedMap`  \nCreate a map containing all the keys in this map that don't\nappear in `map`.\n\n**`toObject`**`() -> Object`\nReturn an object that has the same key/value pairs as the `map`.\n\n**`size`**`: number`  \nThe amount of keys in this map.\n","publish_time":1654076041987,"_cnpm_publish_time":1654076041987,"dist-tags":{"latest":"2.1.1"}}