{"_id":"@anandsuresh/smart-timer","_rev":"3-787b9b811a1ed322d9a788f7e59cc7ab","name":"@anandsuresh/smart-timer","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@anandsuresh/smart-timer","version":"1.0.0","description":"A smart timer implementation","license":"MIT","main":"lib/smart-timer.js","repository":{"type":"git","url":"git+https://github.com/anandsuresh/smart-timer.git"},"author":{"name":"Anand Suresh"},"bugs":{"url":"https://github.com/anandsuresh/smart-timer/issues"},"homepage":"https://github.com/anandsuresh/smart-timer#readme","scripts":{"coverage":"NODE_ENV=test istanbul cover -i 'lib/**/*.js' _mocha -- --ui bdd --reporter spec --recursive spec && open coverage/lcov-report/index.html > /dev/null 2>&1","lint":"standard","test":"mocha --ui bdd --reporter spec --recursive spec"},"devDependencies":{"chai":"4.1.2","istanbul":"1.1.0-alpha.1","mocha":"5.0.5","sinon":"5.0.0","standard":"11.0.1"},"standard":{"ignore":[],"globals":["after","afterEach","before","beforeEach","describe","it"]},"gitHead":"c4e07d96992ca4b251d521108c5aba5151a6cac1","_id":"@anandsuresh/smart-timer@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.9.0","_npmUser":{"name":"anandsuresh","email":"anandsuresh@gmail.com"},"dist":{"integrity":"sha512-I17zNZAALSW/AvMoae+hagRmVw8Xcjb2TE2YuynbikjfHY2dNqQPYWX562IFmkvg561Fv2lFLORJUXJNsrT5Cw==","shasum":"b1c995b7b60635668228bf3ae884159602f2330a","tarball":"https://registry.npmjs.org/@anandsuresh/smart-timer/-/smart-timer-1.0.0.tgz","fileCount":5,"unpackedSize":8264,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkB8pJ46b9BSrZBd388/volzWVbfgUBviVAopS/LTd6gIhAK4OT6v1fqA2/u2Sr9W7DyaUsso57DGms4Y3m/XdCPTr"}]},"maintainers":[{"name":"anandsuresh","email":"anandsuresh@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-timer_1.0.0_1522100295248_0.6849219179865975"},"_hasShrinkwrap":false},"1.0.1":{"name":"@anandsuresh/smart-timer","version":"1.0.1","description":"A smart timer implementation","license":"MIT","main":"lib/smart_timer.js","repository":{"type":"git","url":"git+https://github.com/anandsuresh/smart-timer.git"},"author":{"name":"Anand Suresh"},"bugs":{"url":"https://github.com/anandsuresh/smart-timer/issues"},"homepage":"https://github.com/anandsuresh/smart-timer#readme","scripts":{"coverage":"NODE_ENV=test istanbul cover -i 'lib/**/*.js' _mocha -- --ui bdd --reporter spec --recursive spec && open coverage/lcov-report/index.html > /dev/null 2>&1","lint":"standard","test":"mocha --ui bdd --reporter spec --recursive spec"},"devDependencies":{"chai":"4.1.2","istanbul":"1.1.0-alpha.1","mocha":"5.0.5","sinon":"5.0.0","standard":"11.0.1"},"standard":{"ignore":[],"globals":["after","afterEach","before","beforeEach","describe","it"]},"gitHead":"7bfec5b2ad8c341c3b231806e319b8fa3d57e0e9","_id":"@anandsuresh/smart-timer@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"9.9.0","_npmUser":{"name":"anandsuresh","email":"anandsuresh@gmail.com"},"dist":{"integrity":"sha512-j+oewh3z8STgg2V+AJLBIayviLWq/eqfXATiUHYDdochfZbaDTUnh/kPcjHI/peEVxXjfZyFtOs2v1CfnOCERQ==","shasum":"c7b7d099c975b7634b0ed05e75028f833493cb63","tarball":"https://registry.npmjs.org/@anandsuresh/smart-timer/-/smart-timer-1.0.1.tgz","fileCount":5,"unpackedSize":8264,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCi15gb/11ebxQMLYSjAeKtMu8i+KRnNO7+mMkx9acblgIgao4ZtJqe0OW5m8cFZWO6s8MqkdtLqEzQAcAEJ8kNDtY="}]},"maintainers":[{"name":"anandsuresh","email":"anandsuresh@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/smart-timer_1.0.1_1522113288120_0.7414041491369345"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-26T21:38:15.198Z","1.0.0":"2018-03-26T21:38:15.331Z","modified":"2022-04-04T13:55:16.034Z","1.0.1":"2018-03-27T01:14:48.319Z"},"maintainers":[{"name":"anandsuresh","email":"anandsuresh@gmail.com"}],"description":"A smart timer implementation","homepage":"https://github.com/anandsuresh/smart-timer#readme","repository":{"type":"git","url":"git+https://github.com/anandsuresh/smart-timer.git"},"author":{"name":"Anand Suresh"},"bugs":{"url":"https://github.com/anandsuresh/smart-timer/issues"},"license":"MIT","readme":"# smart-timer\nA smart timer uses a timeout and an interval timer to check for timeout events, thereby avoiding excessive timeout checks.\n\n## usage\n\n```\nconst stream = somehowGetAStream()\n\nconst {create} = require('smart_timer')\nconst timer = create(() => stream.destroy()), {timeout: 5000, interval: 1000})\n\nstream\n  .on('data', () => timer.touch())    // keep the timer updated of activity\n  .on('end', () => timer.destroy())   // destroy the timer when done\n```\n","readmeFilename":"README.md"}