{"name":"orderedmap","version":"1.1.7","description":"Persistent ordered mapping from strings","type":"module","main":"dist/index-cjs.cjs","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"},"types":"./dist/index-cjs.d.ts","gitHead":"b114ccd250531def1bcc1ce97256c525ff35a416","_id":"orderedmap@1.1.7","_nodeVersion":"16.13.1","_npmVersion":"8.4.0","dist":{"integrity":"sha512-B1SuadDDwIRXXutaJQ1xjreGL3hxujpexBG4PquoXbgJD8bjp2k8b8qI/mk7q0LUdIx7T8IALWB8mPbfsjbGCw==","shasum":"ca9c1ea60259863ee9c6bee0e69a3fa10f252df3","tarball":"http://registry-npm.ywwl.com/orderedmap/download/orderedmap-1.1.7.tgz","fileCount":7,"unpackedSize":14224,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDE6MXT/2ZUtMYZwSXd3xnizrC3haGcXAy1lijIOv/bsAiEA6RF1pCLq2DYMEN+dTS0ucJypzVgJOILPvK9WvJhSueQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJif0w5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAAw/9GcRNB65aLeYpr6R1VXWHqfrYf/kWa1d5XWkdFJkMznkTHLGy\r\nd59mMk8Q1Ma4+2qkrES7QHhu29xijs/jXYr+dJ6NFF1zIm+s92JEEba4xTRO\r\nmq/RuSys6nSI4R0lLN+ZP10Wj7NAUq7fWCIbAwPzGWToBcsvvxKxSH0ALid7\r\nvinBp/2WN3HvgInx1WyqN7R0g5dRDzsf8LTlOhBhrr+J82KinpXyPlMm6X/K\r\nYHUp/HqAaIDFwRMvTg1J531x8T9WcD30sQplT/8pMlE9obm0DLYpG054i5Ik\r\nmMJQ1uXKJGpX5wI1/mjhSH5hQ3YjQyFCxZtQXFWq63Hncfz8yxTu/rBxrKRG\r\nfINc9ky5UFlDt1MarUJcn1Ae8Y6dfrMJszLbx23iAtrgp9/yMt2rN/kXdj9b\r\ng0bfNCbhxEVnlndA8QRIPdjouP+vPJjHvvgBRr2Y9XgWrc2bRsWK+2SP9V4D\r\n4z78mH7pv4Z9mvS3ShjQe9Zlgha3aEpApwSubgIsYailuBvOJUoBQtNUdA9G\r\nTRlF5Wbt3TaYNEX2fRBOBDGk4kteBLaBG9UgH7+RTws0M4cu9xM03zTu05wy\r\nl7ooCFoBPq8K66qkJn9yW4WuuHF95ldKV2cn3lxNTkevZNexr/t8+rXFq68M\r\ngE7ukeUrPGT/NX1dohr2Q/PM3fpPVel+iU8=\r\n=Uhj+\r\n-----END PGP SIGNATURE-----\r\n","size":3221,"noattachment":false,"key":"/orderedmap/-/orderedmap-1.1.7.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.7_1652509753738_0.12530333740486066"},"_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":1652509753876,"_cnpm_publish_time":1652509753876,"dist-tags":{"latest":"2.1.1"}}