{"name":"orderedmap","version":"1.1.6","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":"9fa19ab71b7290e7caaf0fa2bbe6ac2d23edf8b0","_id":"orderedmap@1.1.6","_nodeVersion":"16.13.1","_npmVersion":"8.4.0","dist":{"integrity":"sha512-AJ/zu9CxWfDsHvjklOEdbWo1ZqCdJNPK1RGkwc9OA9vyuTHjRH0Jdy1o3KPcjbzz016n+X9SD+Y11f1rhmtpAg==","shasum":"8e61bf6e7ca96b468a11e6253fad6e5234a4b59e","tarball":"http://registry-npm.ywwl.com/orderedmap/download/orderedmap-1.1.6.tgz","fileCount":6,"unpackedSize":13419,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBghYT9HHP4+SWjWGjsWeFqNVMkys70GI6jmkIK+s+dAiEAuYtw9s0QX6u8vcb1EPLdNQtvYLwzFwWCAOyenPFB6Ro="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifm2pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqz3w//bV89hwf9EjGjPa+CrP/GEqpls7arlP7BVHoEsjXsxPgSutEb\r\npbj6MgrICnnDr1ftXZ5QtmbbOXOxuX1Jh73BA4jJP3RBrCYsOep8LuvZduj4\r\n51kxdgkaN9M+kEp6xOuqrF6whz5/jwf4mCPr/fyUUvt2OeCSsADELcdqzjxo\r\ns0GqmF9B7fcSFs/C3eIyeaZsFFMnSTsC50QwOJoci0dVdhGT2Sx2DQFq96PK\r\nPAdi8qJDJS6bAYEbDJv5mcbCvcmkAThKWrmmv9iYQxzCC0l+UDZ9hOu/yET1\r\nUirYp0m+nRqIIJ1Qnw075iz0yJGAqAH2NlA83DZy+9F4DaxZdnhGdt1+BDPB\r\nHJH6TrA2VSFAFb9hHfzxBtHljXIY3tfdC8gdfBaqxrNx3iKUXJHdzyEZWjfH\r\nncj7hjfhsBFREad+EBByYsCmJI+r15m/dPMBazBhY5POTjxGfQV4zsr2Kxz3\r\n8V7MNCKBaBrKhd6f1AUKAOJ7wu8NkthQmqDvYIC07dI1y6ubz+C7Op5N47vs\r\nyLNPOCYRi5xdW4n44O6Y8h7sUvc9GeHQAThOkklurn5KdqDlTM9BxQ+DZNkC\r\nKBinopaSZNvESmHqRA+qPpwvl/yLBNu/dHQVX3ZLcbN1ElDwaFvHvBXyF7cU\r\n29BinFHlBT08cTULU7PioLOmgwG1WWC1U7k=\r\n=uUYv\r\n-----END PGP SIGNATURE-----\r\n","size":3229,"noattachment":false,"key":"/orderedmap/-/orderedmap-1.1.6.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.6_1652452777244_0.8931291499842011"},"_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":1652452777363,"_cnpm_publish_time":1652452777363,"dist-tags":{"latest":"2.1.1"}}