{"name":"orderedmap","version":"1.1.4","description":"Persistent ordered mapping from strings","main":"index.js","module":"index.es.js","types":"types/index.d.ts","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","rollup-plugin-commonjs":"^10.1.0"},"gitHead":"e93cd8b2bdcbdbc7851940cd7ca50f07ac44e36b","_id":"orderedmap@1.1.4","_nodeVersion":"16.13.1","_npmVersion":"8.4.0","dist":{"integrity":"sha512-CWQVEMx/dSU3Sf+907Bf5Y11bSGB2iuj31YTen9bIejGa9W2pc6TBUWOQcBnrnS/sIcT3QVg9O3/yF78GxikjA==","shasum":"00245160157dbfef0eaf4701c19efb44c6c75a28","tarball":"http://registry-npm.ywwl.com/orderedmap/download/orderedmap-1.1.4.tgz","fileCount":6,"unpackedSize":13410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiE0NOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIUQ/8DmczXyAOtpg/qc2Iqtu9wIErKycxnCgRkCEVfdlXy/nEj/O0\r\n3QWOMtliM51F9h3CDJo1tWXidRTBYn7n/yxPH8D5dcKgm0AdFPw0UtTa4PEQ\r\nuBIOOzbOae5XOZuIyBcxDG6xQsas95UJD1plVRDUpd7Y4Zcy0WE9+kJrz8df\r\nKCz0z24lw1BIyt3/g+6lzbSSzo8GcZJNLAwIyC9PGfTMIvfDTzXF2oYVvFaD\r\n/w7irCABQ2IEY95XxytFH/SoWpw/+rwRl3l3hv1Avw+rKSB8vV8uopZzDrLD\r\nmsqJ7RfpPZgeOjvmPj0/jq4HGi9/S7icBU24V5asi09UbvsPztdy4sk8HY/0\r\n3pbTXaKugN17w3EfGnQdBWXrugvAqlRBh7qz+pn19pFk55dmSTiPl9Lsqwi6\r\nnrRsILbxlSfFtOd7hETCqTybA+4rC6yEvnIsWpL+tNkmAs7Q7T1vAGX/Eb7R\r\nfLby4qGUHtTy10VkdiF6PGMeW1PtK2Vyjc3qh2Iod+IXt7uvgezFszcdzpq8\r\nXMvUCkyhUZ6n6yLg3L4VpZvXdIWeRU5lMiX32BPtWvGpm9ErLiU4B7YXr7I0\r\nJK0y9lINa6F8KDfiEJ8FtDN0Br4EUK6b6n7xoDj+y/d3QJr3CYNBJ89IV2Yd\r\nQ4D8EFT1+1kU53kOQO7wt+E17CFX+XQFvi8=\r\n=fc5G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDh6agU8MgdkNQniOv2JJevcd8Zb4+fqBj3gnR81nV2PwIhAMjYZ2yKrhq1E0xF8KANL2IOFWL/DqpYmjOr8fcNrR4F"}],"size":3225,"noattachment":false,"key":"/orderedmap/-/orderedmap-1.1.4.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.4_1645429581942_0.5117327226418191"},"_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":1645429582115,"_cnpm_publish_time":1645429582115,"dist-tags":{"latest":"2.1.1"}}