{"_id":"@amscotti/jiffy-timer","_rev":"2-0a1d8715c7bc9be7f8c5e1900fc5744c","name":"@amscotti/jiffy-timer","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@amscotti/jiffy-timer","type":"module","engines":{"node":"^18.16 || ^20.4"},"version":"1.0.0","description":"jiffy-timer is a high-precision, easy-to-use JavaScript timer library designed for measuring elapsed time. It offers a fluent API and can be used for performance tracking, benchmarking, or simply keeping time within your JavaScript applications.","main":"index.js","scripts":{"lint":"standard --fix","test":"standard && ava","coverage":"c8 --all --reporter=html --reporter=text npm test"},"repository":{"type":"git","url":"git+https://github.com/amscotti/jiffy-timer.git"},"keywords":["timer","performance","measurement","timing","elapsed-time","performance-timer","stopwatch"],"author":{"name":"anthony.m.scotti@gmail.com"},"license":"MIT","devDependencies":{"ava":"^5.3.1","c8":"^8.0.1","standard":"^17.1.0"},"_id":"@amscotti/jiffy-timer@1.0.0","gitHead":"cb4073764c68da200109d8fbeae03211e91ca537","bugs":{"url":"https://github.com/amscotti/jiffy-timer/issues"},"homepage":"https://github.com/amscotti/jiffy-timer#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-kAluRGa//T+sj0zgVnDMD+/D8nNX2aLMx7+rVoFKxHPwbY9FOM3qgvGWTLGjQcfrC/GnOb0AhKP6T8brI2NtPw==","shasum":"469125f960db741c56aee6ca34620cc881d55666","tarball":"https://registry.npmjs.org/@amscotti/jiffy-timer/-/jiffy-timer-1.0.0.tgz","fileCount":4,"unpackedSize":5824,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0H/uSfK+WExPv/6qGDOR8Zpfg9d8DvhMYK0eoN2TN5gIhALQ7pDW88RoAeqocBpqBKv9o9ZFTYbETFwIpLfsV/kAm"}]},"_npmUser":{"name":"amscotti","email":"npmjs@services.scotti.io"},"directories":{},"maintainers":[{"name":"amscotti","email":"npmjs@services.scotti.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jiffy-timer_1.0.0_1692361107658_0.9167739515965303"},"_hasShrinkwrap":false},"1.1.0":{"name":"@amscotti/jiffy-timer","type":"module","engines":{"node":"^18.16 || ^20.4"},"version":"1.1.0","description":"jiffy-timer is a high-precision, easy-to-use JavaScript timer library designed for measuring elapsed time. It offers a fluent API and can be used for performance tracking, benchmarking, or simply keeping time within your JavaScript applications.","main":"index.js","types":"./types/index.d.ts","scripts":{"check":"tsc --noEmit true","build":"tsc --emitDeclarationOnly true --noEmitOnError","lint":"standard --fix","test":"standard && ava","coverage":"c8 --all --reporter=html --reporter=text npm test"},"repository":{"type":"git","url":"git+https://github.com/amscotti/jiffy-timer.git"},"keywords":["timer","performance","measurement","timing","elapsed-time","performance-timer","stopwatch"],"author":{"name":"anthony.m.scotti@gmail.com"},"license":"MIT","devDependencies":{"ava":"^5.3.1","c8":"^8.0.1","standard":"^17.1.0","typescript":"^5.2.2"},"_id":"@amscotti/jiffy-timer@1.1.0","gitHead":"b5a26bba199bb7ab4761af667cc59825edee5b70","bugs":{"url":"https://github.com/amscotti/jiffy-timer/issues"},"homepage":"https://github.com/amscotti/jiffy-timer#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-plp+zX1TUNlpe65XeeP6bwlroc2ME8XijUGI4xzOpKch24R3Tr9OaedoNDG1Mfn9zbiBHEs2cNnuG/OZR1Pong==","shasum":"dd81646089a4fdfebba5fce0eb26e83f1e74dd79","tarball":"https://registry.npmjs.org/@amscotti/jiffy-timer/-/jiffy-timer-1.1.0.tgz","fileCount":4,"unpackedSize":5999,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVdZOxGh+qpmOlxSZa9eEA+zLNW9I+qBV1XMjmwV5oAAiAV8YHC/RD7qEIaQL1rUj+7uQISt2ZfeyEpQA4uRAowKw=="}]},"_npmUser":{"name":"amscotti","email":"npmjs@services.scotti.io"},"directories":{},"maintainers":[{"name":"amscotti","email":"npmjs@services.scotti.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jiffy-timer_1.1.0_1693098357471_0.49385979650644596"},"_hasShrinkwrap":false},"1.1.1":{"name":"@amscotti/jiffy-timer","type":"module","engines":{"node":"^18.16 || ^20.4"},"version":"1.1.1","description":"jiffy-timer is a high-precision, easy-to-use JavaScript timer library designed for measuring elapsed time. It offers a fluent API and can be used for performance tracking, benchmarking, or simply keeping time within your JavaScript applications.","main":"index.js","types":"./types/index.d.ts","scripts":{"check":"tsc --noEmit true","build":"tsc --emitDeclarationOnly true --noEmitOnError","prepublishOnly":"npm run build","lint":"standard --fix","test":"standard && ava","coverage":"c8 --all --reporter=html --reporter=text npm test"},"repository":{"type":"git","url":"git+https://github.com/amscotti/jiffy-timer.git"},"keywords":["timer","performance","measurement","timing","elapsed-time","performance-timer","stopwatch"],"author":{"name":"anthony.m.scotti@gmail.com"},"license":"MIT","devDependencies":{"ava":"^5.3.1","c8":"^8.0.1","standard":"^17.1.0","typescript":"^5.2.2"},"_id":"@amscotti/jiffy-timer@1.1.1","gitHead":"e1840173db191e34500b5bfd0c09abdad731dcc8","bugs":{"url":"https://github.com/amscotti/jiffy-timer/issues"},"homepage":"https://github.com/amscotti/jiffy-timer#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-ZxFMqFQnMwZLvSkcySx1edqTow9dmXBbdUkAdWyeIXbr9iaSGfGNsyG9Uv7lD/T9YMKnl7IgWtV90N6cxGHxTQ==","shasum":"00c4a2ce9e3eb76b929984be3088da6efa67cda4","tarball":"https://registry.npmjs.org/@amscotti/jiffy-timer/-/jiffy-timer-1.1.1.tgz","fileCount":5,"unpackedSize":6999,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC3N6j13DPfPWzqprXKzTZQ4kCWb0lH5ALTNBx6TvtNJAiEAoiKhw35TZwmis97V8j0J6NKL4Nmoq7Y1xNJK6yXLKxk="}]},"_npmUser":{"name":"amscotti","email":"npmjs@services.scotti.io"},"directories":{},"maintainers":[{"name":"amscotti","email":"npmjs@services.scotti.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jiffy-timer_1.1.1_1693099146087_0.11410493391681387"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-18T12:18:27.558Z","1.0.0":"2023-08-18T12:18:27.807Z","modified":"2023-08-27T01:19:06.518Z","1.1.0":"2023-08-27T01:05:57.618Z","1.1.1":"2023-08-27T01:19:06.324Z"},"maintainers":[{"name":"amscotti","email":"npmjs@services.scotti.io"}],"description":"jiffy-timer is a high-precision, easy-to-use JavaScript timer library designed for measuring elapsed time. It offers a fluent API and can be used for performance tracking, benchmarking, or simply keeping time within your JavaScript applications.","homepage":"https://github.com/amscotti/jiffy-timer#readme","keywords":["timer","performance","measurement","timing","elapsed-time","performance-timer","stopwatch"],"repository":{"type":"git","url":"git+https://github.com/amscotti/jiffy-timer.git"},"author":{"name":"anthony.m.scotti@gmail.com"},"bugs":{"url":"https://github.com/amscotti/jiffy-timer/issues"},"license":"MIT","readme":"# jiffy-timer\n\n`jiffy-timer` is a high-precision JavaScript timer which allows you to easily measure elapsed time in your applications. \n\nWhether tracking performance, benchmarking functions, or creating a stopwatch, `jiffy-timer` gives you an easy to use API for time measurements.\n\n## Installation\n\nYou can install `jiffy-timer` with npm:\n\n```bash\nnpm install @amscotti/jiffy-timer\n```\n\n## Usage\n\nHere's an example of how to use `jiffy-timer`:\n\n```javascript\n// Import Timer class\nimport { Timer } from '@amscotti/jiffy-timer'\n\n// Create a new timer instance\nconst timer = new Timer()\n\n// Start the timer\ntimer.start()\n\n// Do some operations... \n\n// Stop the timer\ntimer.stop()\n\n// Get the elapsed time in milliseconds \nconst elapsed = timer.elapsedTime()\nconsole.log(elapsed)\n```\n\nYou can also do the same with the fluent API, \n\n```javascript\n// Import Timer class\nimport { Timer } from '@amscotti/jiffy-timer'\n\n// Create a new timer instance and start the timer\nconst timer = new Timer().start()\n\n// Do some operations... \n\n// Stop the timer and get the elapsed time in milliseconds \nconst elapsed = timer.stop().elapsedTime()\nconsole.log(elapsed)\n```\n\n## API\n\n### `start()`\n\nStarts the timer. If the timer has already been started, it throws an error.\n\nUsage:\n```javascript\ntimer.start()\n```\n\n### `stop()`\n\nStops the timer. If the timer has not been started or has already been stopped, it throws an error.\n\nUsage:\n```javascript\ntimer.stop()\n```\n\n### `reset()`\n\nResets the timer.\n\nUsage:\n```javascript\ntimer.reset()\n```\n\n\n### `elapsedTime()`\n\nReturns the elapsed time in milliseconds between start and stop calls. If not stopped, return the elapsed time for the current time. If the timer has not been started, it throws an error.\n\nUsage:\n```javascript\nconst elapsed = timer.elapsedTime()\n```\n\n## Testing\n\nTests have been written using AVA and can be run using npm:\n\n```bash\nnpm run test\n```\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n\n## Contributing\n\nContributions are welcome! Please read the contributing guide for details.\n\n## Problems or Questions\n\nIf you encounter any problems or have any questions, please open an issue.\n","readmeFilename":"readme.md"}