{"name":"orderedmap","version":"2.1.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":"95d14c21480f38b8e671bc933f75d4a9be10b8eb","_id":"orderedmap@2.1.0","_nodeVersion":"16.13.1","_npmVersion":"8.10.0","dist":{"integrity":"sha512-/pIFexOm6S70EPdznemIz3BQZoJ4VTFrhqzu0ACBqBgeLsLxq8e6Jim63ImIfwW/zAD1AlXpRMlOv3aghmo4dA==","shasum":"819457082fa3a06abd316d83a281a1ca467437cd","tarball":"http://registry-npm.ywwl.com/orderedmap/download/orderedmap-2.1.0.tgz","fileCount":6,"unpackedSize":13916,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3M1D8aGpVIUhP/WHTQbNlKe5kv52y7IlR/Er4pXMDmQIgcseuMNQuOukBrr4KPAb31BBnm28PPiY9cN0cgUBCg9Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMUBxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqCBAAiZwcjOMRdhRcqAMtmoklqHzuhvzKbZWzDjCHVnEoUhW9Q2Gp\r\nwifS/kh9rmj6Gm/PL1B0gg3Hnra3ekDDqkO3gYaVBxX2Ho1z4JeL9xYh1Uvo\r\nCs1WNa/EQ0//IgYL5ysc28u4Qsn/huQ1hB62FHXnyFlK99SVp8Kj8fnpR1ha\r\nh0z++94YgLFgKuyKN/LXg1+eNO+SHK0nlCGkASAKVGhuYh9fvoqWqt/eN1u6\r\n1chgdYk9i7R0z8Vgb3CLvf6kElI2upj5QdcUUcz3jZJzJGXdZl94ELUDx25d\r\nxsTsChTsgEOW96SVeOr42RBmUp5G4Ft0MGoV4K6T8wyDRFo8aPMkUHyRYS7y\r\nVvHR1CC6amscD+0iohEqKe3u1hzktcHI2ulOWPXJrlWD3wNDpW+AyuG8F8X2\r\nVKVOzEsoZ2ZEkGUF/kSFu1GMfJHu9WXVPrPX2LQ4SRYdLK82rqU3IuwUYW+P\r\nve9XZ9w83UJWRFvO/aGmQ66PWcTiCvus4FvCJES9PufStYnA+M+MiIZHRMCQ\r\nKRY4B+Z0qRJ8WEAjKJUKcG5hAobgjLhjVizEnjmMDk+oTc921l6s5vusRcWy\r\n5pZET6mEHS3dVcVyIkJMg7U5h3QqJxSzSbMIR2acMuL9k/raZA6GEDIZiBor\r\nlaosjRDgJJHkisl3LsYOQ1Qzp4L9t8qzc1E=\r\n=EI0T\r\n-----END PGP SIGNATURE-----\r\n","size":3239,"noattachment":false,"key":"/orderedmap/-/orderedmap-2.1.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.1.0_1664172145452_0.726455522251154"},"_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":1664172145630,"_cnpm_publish_time":1664172145630,"dist-tags":{"latest":"2.1.1"}}