{"name":"orderedmap","version":"2.0.0","description":"Persistent ordered mapping from strings","type":"module","main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.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":"1df2cb0beb75a1f50f3b6a38490766f45182cecf","_id":"orderedmap@2.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.10.0","dist":{"integrity":"sha512-buf4PoAMlh45b8a8gsGy/X6w279TSqkyAS0C0wdTSJwFSU+ljQFJON5I8NfjLHoCXwpSROIo2wr0g33T+kQshQ==","shasum":"12ff5ef6ea9d12d6430b80c701b35475e1c9ff34","tarball":"http://registry-npm.ywwl.com/orderedmap/download/orderedmap-2.0.0.tgz","fileCount":6,"unpackedSize":13516,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEjW7N+Xr7UTm/JO6VvBrqyVE2sjahNwjTf0PsiUjWseAiEA5MV5JyjA9TMpnzVGH+DBW85rK2//EUoyufSTDY4HNQc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqYPgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqtqw/+M6kE1ZXIH0TJqjyv7jwcPRTJPka8FEJO6IxsrlZTQ1OnW5DU\r\nl2oXIRYxk3iZ/OJtWCs6g11U5AP0oid2tWrP8v8rjugYnOCIYSKMZsYo4PNI\r\ndTG/sIvSo88svJMhR+KINz97mNZmf760mrRyguTuQTgkQZMcl9OrHboyb91y\r\nKlqUlou28cVpzXBfNZvFV7ru3/fEO7H/sc6Kf4sbmwAULNoPMuPxfVBzY7ad\r\n1b58F9EUrjEex0aV7e7YvnoSLfbc0Gin5A9DHJ93IYnT7rA2ESgK23e5DvbZ\r\n65ZWpgCkqVfcSrMuG4tP1Cq2kVNnHVfqmJ6yOzaEUWJZ10j2l1k03KakYCje\r\nP7zhNookhsv5OLmwrNNnjlINdELRl6wsOughykUvapjg5jlme/7/YVJs4758\r\nLvPghX+fekRJIZ4FnEY4SJwqvTMBZDmQbkPDHtALHCK+iCeLnvQhYOcsvl4R\r\nU96/tmxXUiuOVDlSM8eh5i7qaeD/cMz5RT5SHVisLZeA5dZT0idf7uNljpTk\r\n5yXKH1jukVApi/LqYJ1ef0qKsRrySMIK5fU1zJ3s+j57Dm1lYbt4TytC8GV1\r\nlegxkIjmRyUsxf5lgMezH3s5f8VcPHQU+Asa+dEMP7CwpAso22jUC0nAQ0w8\r\nZkImxp+UqCp20GVwOvYc8LZdPzdoOcwAM/k=\r\n=bhGc\r\n-----END PGP SIGNATURE-----\r\n","size":3183,"noattachment":false,"key":"/orderedmap/-/orderedmap-2.0.0.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_2.0.0_1655276512168_0.888718299632691"},"_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":1655276512355,"_cnpm_publish_time":1655276512355,"dist-tags":{"latest":"2.1.1"}}