{"name":"@jridgewell/set-array","version":"1.0.0","description":"Like a Set, but provides the index of the `key` in the backing array","keywords":[],"author":{"name":"Justin Ridgewell","email":"justin@ridgewell.name"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jridgewell/set-array.git"},"main":"dist/set-array.umd.js","module":"dist/set-array.mjs","typings":"dist/types/set-array.d.ts","exports":{".":{"browser":"./dist/set-array.umd.js","require":"./dist/set-array.umd.js","import":"./dist/set-array.mjs"},"./package.json":"./package.json"},"engines":{"node":">=6.0.0"},"scripts":{"prebuild":"rm -rf dist","build":"run-s -n build:*","build:rollup":"rollup -c rollup.config.js","build:ts":"tsc --project tsconfig.build.json","lint":"run-s -n lint:*","lint:prettier":"npm run test:lint:prettier -- --write","lint:ts":"npm run test:lint:ts -- --fix","pretest":"run-s build:rollup","test":"run-s -n test:lint test:only","test:debug":"mocha --inspect-brk","test:lint":"run-s -n test:lint:*","test:lint:prettier":"prettier --check '{src,test}/**/*.ts'","test:lint:ts":"eslint '{src,test}/**/*.ts'","test:only":"mocha","test:coverage":"c8 mocha","test:watch":"mocha --watch","prepublishOnly":"npm run preversion","preversion":"run-s test build"},"devDependencies":{"@rollup/plugin-typescript":"8.3.0","@typescript-eslint/eslint-plugin":"5.10.0","@typescript-eslint/parser":"5.10.0","c8":"7.11.0","eslint":"8.7.0","eslint-config-prettier":"8.3.0","mocha":"9.2.0","npm-run-all":"4.1.5","prettier":"2.5.1","rollup":"2.66.0","typescript":"4.5.5"},"gitHead":"a904d522244ba8a80c39feb6e1076c6912967a6a","bugs":{"url":"https://github.com/jridgewell/set-array/issues"},"homepage":"https://github.com/jridgewell/set-array#readme","_id":"@jridgewell/set-array@1.0.0","_nodeVersion":"18.0.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-LcqVnHCjOAj8BTCtjpwYZCMTn4yArusbdObCVRUYvBHhrR5fVLVyENG+UVWM4T4H/ufv7NiBLdprllxWs/5PaQ==","shasum":"6a8e62049ab198c5f7daf8047e71947ef46c11c8","tarball":"http://registry-npm.ywwl.com/@jridgewell/set-array/download/@jridgewell/set-array-1.0.0.tgz","fileCount":8,"unpackedSize":11660,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYqrz2zY1VXVjR7YnwF7rHQ5NLxKCJWADSaZ3eX6CgRAiAG6+s8QfzKq2TBwWyEemvy7YPSPX001ezB6DvLblp7Jg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZHuaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLyQ//UyQEKDfJ9irToKg69QcNyracnQthpBoV0I7iHOfBFFaZuqYv\r\nACn9UkkT3WQYXeLaEP+/Tb2FYcQUEc7tWTfi4IxxbtMyCyHRb4p/fd4Mxu3z\r\n0rBMa0RExFFV++Hy/ufaU+Ewh5mdS+0eLXl/8iZeh9e+DlFHe+KGgo780Zok\r\nPG5lg5O6jRjZneAErsZI9st9tiWDYZ6tWmcV1xXSX8h9blJzZ3d80Z9u2487\r\n+e9O3qACSODy3ClEOIqw1Hdke/BhPClUey/HIigsSh6pVlKSmk6Rc+0XvgL5\r\nQE8wABD7j3G3JXw42QXR5947l57Am12CeaZ92hcLiXHBHfG/35eroIveb51q\r\nJu3CBQNZIOL/SMMwqn+HnFtAKVuPqAsyZ4OwCgOQiVbHBgQuk1H+SIO60noz\r\nLifCTv+ExIP9iyWyS/oH06C5YtYpedKCFziTkhjIOgAPUYFOwazTRu0MgvPB\r\nfWGpSkPQUKi6ZfwBjqjsk5eo+17LqNSmCv5eYP4ZAVteMVyzxbtXpUcptf31\r\nj1Z+JFSCukbtckktTz02VmqQSgCunviq+kMp1vJhR/npAwKuhwe0HfjrYQfF\r\nRoK9ilMdpyrM01Q68XUlHTCJjoWXf64x9hH7KYaOS3cc8jQNjPkvRBHivk2k\r\nVa3Ph5IBcJL2ltyDrU+bTpO5sXBxot/ntEo=\r\n=PNEn\r\n-----END PGP SIGNATURE-----\r\n","size":3296,"noattachment":false,"key":"/@jridgewell/set-array/-/@jridgewell/set-array-1.0.0.tgz"},"_npmUser":{"name":"jridgewell","email":"justin+npm@ridgewell.name"},"directories":{},"maintainers":[{"name":"jridgewell","email":"justin+npm@ridgewell.name"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/set-array_1.0.0_1650752410748_0.1292827758672781"},"_hasShrinkwrap":false,"deprecated":"incorrect UMD name","readme":"# @jridgewell/set-array\n\n> Like a Set, but provides the index of the `key` in the backing array\n\nThis is designed to allow synchronizing a second array with the contents of the backing array, like\nhow in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there\nare never duplicates.\n\n## Installation\n\n```sh\nnpm install @jridgewell/set-array\n```\n\n## Usage\n\n```js\nimport { SetArray, get, put, pop } from '@jridgewell/set-array';\n\nconst sa = new SetArray();\n\nlet index = put(sa, 'first');\nassert.strictEqual(index, 0);\n\nindex = put(sa, 'second');\nassert.strictEqual(index, 1);\n\nassert.deepEqual(sa.array, [ 'first', 'second' ]);\n\nindex = get(sa, 'first');\nassert.strictEqual(index, 0);\n\npop(sa);\nindex = get(sa, 'second');\nassert.strictEqual(index, undefined);\nassert.deepEqual(sa.array, [ 'first' ]);\n```\n","publish_time":1650752410927,"_cnpm_publish_time":1650752410927,"dist-tags":{"latest":"1.2.1"}}