{"versions":{"1.0.0":{"name":"expire-set","version":"1.0.0","description":"A set which values automatically expire","repository":{"type":"git","url":"git+https://github.com/Sorunome/expire-set.git"},"bugs":{"url":"https://github.com/Sorunome/expire-set/issues"},"main":"./lib/src/index.js","scripts":{"prepublishOnly":"npm run build","lint":"tslint --project ./tsconfig.json -t stylish","build":"tsc","test":"npm run-script build && mocha"},"author":{"name":"Sorunome"},"dependencies":{},"devDependencies":{"@types/chai":"^4.2.11","@types/mocha":"^7.0.2","@types/node":"^12.12.31","chai":"^4.2.0","mocha":"^7.1.1","source-map-support":"^0.5.16","ts-node":"^8.8.1","tslint":"^6.1.0","typescript":"^3.8.3"},"gitHead":"6b7a25ef21c3d7405e43593fe6370dfdac917bab","homepage":"https://github.com/Sorunome/expire-set#readme","_id":"expire-set@1.0.0","_nodeVersion":"13.11.0","_npmVersion":"6.14.3","dist":{"integrity":"sha512-wOQlqatf2sJtOabNk3gEPbGvo/C8tIUhzT3rz08+i7X+u1NV+UNY4p3Lzq8DxrW57mBML1Fp5qNeYt70Qnndpg==","shasum":"b3a360675cc623108b5199f203876ea9535fe2d4","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/expire-set/-/expire-set-1.0.0.tgz","fileCount":6,"unpackedSize":17936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefcuQCRA9TVsSAnZWagAAassP/jczGPT8d/LLaQ4HZozJ\nfUfTr1QLbXXMijXcSv3d5aJmhZkPxzyvQLb0P6AUa3GS65OL7Alr+cH3e/bK\n/yPoR0kRDvnixezrD1QphYvThWx9Wew352Kd2803uGnUN6Llt6wVt/Pn3cIe\nSBWKmhgaoK7PfWyVw4+Oq4ktspnaK1h0lCH4GlTt360xeJIqcZEGD/ElnWrC\nnmgs29kPYFGE2ES6RV+xN23Xmzob4wQRO4NrJYRVOhy1E8sCKxg4Vd49VFIg\ntUa0FNSzXxxaKyug8h5GEr5jeqaI3p3TZeQm7MAaAJKqeaAPbtSDdTkqx9e8\n3hT44/xAShOPQoVQoCqkoSqSong+N+/jlBE9Hgn4aBOrJsUTXs8JI1f8L//+\nXz2cOkzJgnkdgic5ypi1WNTjqenAOGnUUJ79uSWMMgoM5G6Ru/t9A/aDYp5j\nouHseyl7/yr2rJEFwwk9N6XqHIAL9ygNchXC8CihZzGdqrY+ov8T6Kk5oomI\nHGyf5NfBfVpX0GiVrHqP7FYPTOBuhTR3ty2PB5hoBR+hMhF51KIxGS9mprFi\n/Qlrwt9i6PvzURQOcI0iJ17KJLBq6uKF9jS8Ku6j4ISkuyc0Z7bVzk3cb6le\nfrlqx0SiBac1s6bgcNI01G4d9G+D0niWSKYPZ8bAH9l04P4Vmq0rIeMMuWAq\nFbaF\r\n=oYbJ\r\n-----END PGP SIGNATURE-----\r\n","size":5947},"maintainers":[{"name":"anonymous","email":"mail@sorunome.de"}],"_npmUser":{"name":"anonymous","email":"mail@sorunome.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expire-set_1.0.0_1585302415615_0.39651222753639104"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T18:27:55.517Z","contributors":[]}},"dist-tags":{"latest":"1.0.0"},"name":"expire-set","time":{"created":"2022-01-27T22:22:41.338Z","modified":"2022-01-27T22:22:41.338Z","1.0.0":"2020-03-27T09:46:55.794Z"},"readme":"# expire-set\nexpire-set is a package that is basically a set - only that its values expire after a certain set time.\n## Usage\n\nJust use it as if you would be using a normal set:\n\n```js\nconst ExpireSet = require(\"expire-set\");\nconst timeout = 10000; // 10 seconds\nconst set = new ExpireSet(timeout);\nset.add(\"fox\");\nconsole.log(set.has(\"fox\")); // outputs true\nsetTimeout(() => {\n\tconsole.log(set.has(\"fox\")); // outputs false\n}, timeout + 6); // the library needs some time to do its magic\n```\n\nYou can also use it with typescript:\n\n```ts\nimport ExpireSet from \"expire-set\";\nconst timeout = 10000; // 10 seconds\nconst set = new ExpireSet<string>(timeout);\nset.add(\"blah\");\nset.delete(\"blah\");\n```\n\n## Methods\nThe following methods exist:\n - `set.size`: Returns the size of the ExpiredSet\n - `set.all`: Returns the ExpiredSet as a normal Set\n - `set.add(value)`: Adds a value to the ExpiredSet, returning itself\n - `set.has(value)`: Returns true/false, if the ExpiredSet has the value\n - `set.delete(value)`: Deletes a value of the ExpiredSet, returning itself","users":{}}