{"name":"@jridgewell/set-array","version":"1.1.2","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":{".":[{"types":"./dist/types/set-array.d.ts","browser":"./dist/set-array.umd.js","require":"./dist/set-array.umd.js","import":"./dist/set-array.mjs"},"./dist/set-array.umd.js"],"./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","@types/mocha":"9.1.1","@types/node":"17.0.29","@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":"f1d9855dd0d7e34bcc02307249783589ed715661","bugs":{"url":"https://github.com/jridgewell/set-array/issues"},"homepage":"https://github.com/jridgewell/set-array#readme","_id":"@jridgewell/set-array@1.1.2","_nodeVersion":"17.6.0","_npmVersion":"8.5.1","dist":{"integrity":"sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==","shasum":"7c6cf998d6d20b914c0a55a91ae928ff25965e72","tarball":"http://registry-npm.ywwl.com/@jridgewell/set-array/download/@jridgewell/set-array-1.1.2.tgz","fileCount":9,"unpackedSize":15487,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDay7ktBwWQ4OYGzdQoTo0X6M4WbnlFs9n3BGmL1bgLWAIhANQ5HA+jGmEO6mKhte3bPqStjdlaxLC1P/EgRQ2PK43j"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuH7JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbUg//br2z0IYqPNuY/Vc2hZarQXJhliCWYsME3/8qrgkAuDsMeF/l\r\nsKQwCKUtvh/Nz2Y2vxBaO3YFI/US2q2vsjU9j2TxkXVD8qRyG55Rm4OARvdy\r\npjOA/wQdZ5ZLZ0SmjeZKwuwC/xX7YsFpkkdQaWk2/ghmScKvQxKS40g+/XJE\r\nCmfWwrmRIIVFVejfP1azVGsNdAVRAO9Jbe2d5taX9i7dXZEp/Ezc7UU3ygMX\r\nMThGdlfFDVyEGCQKoeZEwFT3WdrkeGAwdrIeMVyV+QCbGqJDUV5xFFdvD0X9\r\nqMmMDA5i91D/MlfTG0gtIr6Uj66fiJOO5N9XMcNYGSY+ZKxhwgyZuZ2vapwr\r\nNhtWkbwb0XvbNP6Q4v4wc51gAINsBtjI8neNREKg+KdTKKbsGRgJFoYbDSaN\r\nN1mWSagGvfY7rjFLfP4psCqLlZSTYZKTPRf+UECLYCr4fqQeAVJcvTk95K2d\r\n0ud6Z3PFrpNnyJJuisYWIUwQvvpApl7Lt75B3LpMYG8854rtXAiNZmG/jlY/\r\ncEngKpySm3aXOPZqXLvFVrzC2MPBfANVnCv8QqTQZQGYp9qRG1nh5ga++mxt\r\nI24+jFhuNPyOzmnfCAxEHf/EjXsqXjbqDe0ssUSBVFx0okDRE2vQjKOT1xzT\r\nUfGc4DVwIymIJShEF26WEEobnigfk2jn0oo=\r\n=zxBC\r\n-----END PGP SIGNATURE-----\r\n","size":3757,"noattachment":false,"key":"/@jridgewell/set-array/-/@jridgewell/set-array-1.1.2.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.1.2_1656258248997_0.09833176486457473"},"_hasShrinkwrap":false,"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":1656258249141,"_cnpm_publish_time":1656258249141,"dist-tags":{"latest":"1.2.1"}}