{"_id":"last-run","_rev":"14-a2076070a0563ba367ff1eb55fdf66de","name":"last-run","description":"Capture and retrieve the last time a function was run","dist-tags":{"latest":"2.0.0"},"versions":{"0.1.0":{"name":"last-run","version":"0.1.0","description":"Capture and retrieve the last time a function was run","author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com"},"contributors":[],"repository":{"type":"git","url":"https://github.com/phated/last-run"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"test":"lab -cvL"},"dependencies":{"default-resolution":"^1.0.0","es6-weak-map":"^0.1.2"},"devDependencies":{"code":"^1.4.0","lab":"^5.5.1"},"keywords":["execution","function","last run","timing"],"gitHead":"7793736154bd2c296eae762b87e724692afcc674","bugs":{"url":"https://github.com/phated/last-run/issues"},"homepage":"https://github.com/phated/last-run","_id":"last-run@0.1.0","_shasum":"847926c53059363e63ab33d1a09d145f48f40dac","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.10.36","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"847926c53059363e63ab33d1a09d145f48f40dac","tarball":"https://registry.npmjs.org/last-run/-/last-run-0.1.0.tgz","integrity":"sha512-WUjMWeGuFJgVZ0Xd/1oMc5xAaVKYR2yzEi19bSM7i8qhVcLQ9bhI+0pMFkPdxZHzXi03Swbuvd82Zgbe0YYasg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdqCo5Rnht7Ab1f7cULhV7JgoatZB0liAF8myoMCaQiwIhAMfc7rMEXaXK005ivGQGdt+o20HdWAFK42xQnECzz8te"}]},"directories":{}},"0.1.1":{"name":"last-run","version":"0.1.1","description":"Capture and retrieve the last time a function was run","author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com"},"contributors":[],"repository":{"type":"git","url":"https://github.com/phated/last-run"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"test":"lab -cvL"},"dependencies":{"default-resolution":"^1.0.0","es6-weak-map":"^0.1.2"},"devDependencies":{"code":"^1.4.0","lab":"^5.5.1"},"keywords":["execution","function","last run","timing"],"gitHead":"1d61545bb9b5fdb9e131d9b99bbea9b6cbfddb63","bugs":{"url":"https://github.com/phated/last-run/issues"},"homepage":"https://github.com/phated/last-run","_id":"last-run@0.1.1","_shasum":"fe8431a2e5447df004931310631c422062bafc31","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.10.36","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"fe8431a2e5447df004931310631c422062bafc31","tarball":"https://registry.npmjs.org/last-run/-/last-run-0.1.1.tgz","integrity":"sha512-OKcvgW096e37/jRwlUxFudZYl0TuOHAp62GkL9xfgblnEml7xW71mDJrU9Pu8/XUHngGrx0h+yAfkNScrHv65A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDN3hQvLciTqWQIiL+wk4hxyHHQB4I05Npg6OpZVLreeAiBq84YL8bXCC0De6GQHss1LiJl+RIZruLygKtwPfNFPIw=="}]},"directories":{}},"0.2.0":{"name":"last-run","version":"0.2.0","description":"Capture and retrieve the last time a function was run","author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com"},"contributors":[],"repository":{"type":"git","url":"https://github.com/phated/last-run"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"test":"lab -cvL"},"dependencies":{"default-resolution":"^1.0.0","es6-weak-map":"^0.1.2"},"devDependencies":{"code":"^1.4.0","lab":"^5.5.1"},"keywords":["execution","function","last run","timing"],"gitHead":"620dea6676e6b2ff1bf7c39f6932e149f2990bf9","bugs":{"url":"https://github.com/phated/last-run/issues"},"homepage":"https://github.com/phated/last-run","_id":"last-run@0.2.0","_shasum":"5ed83002c81a802ff797c74f3eda88b813eb2c53","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.10.36","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"5ed83002c81a802ff797c74f3eda88b813eb2c53","tarball":"https://registry.npmjs.org/last-run/-/last-run-0.2.0.tgz","integrity":"sha512-d7o6TJaOM8B4BpKRMuxkGxUWhfvkAq26s0W4sB/xP27ywbF9apFw6B6XaSv8AmquhHw9HsKZro3zuJvM3qLHxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpDj8o5Tyl3Q5HcFdnYpTp0VUmTovlHfwGn1dXz0UdzAIhAJvI5LZnwQlS2atD56u6WXJhvmQLBeq2Wy+bSvu5nyqZ"}]},"directories":{}},"1.0.0":{"name":"last-run","version":"1.0.0","description":"Capture and retrieve the last time a function was run","author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com"},"contributors":[],"repository":{"type":"git","url":"https://github.com/phated/last-run"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"test":"lab -cvL"},"dependencies":{"default-resolution":"^1.0.0","es6-weak-map":"^1.0.1"},"devDependencies":{"code":"^1.4.0","lab":"^5.5.1"},"keywords":["execution","function","last run","timing"],"gitHead":"8dc3882fc3148493807f88915d1398923f71c3f7","bugs":{"url":"https://github.com/phated/last-run/issues"},"homepage":"https://github.com/phated/last-run","_id":"last-run@1.0.0","_shasum":"168fb401d38332ef2bd16ab532fcac75e59e4004","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"168fb401d38332ef2bd16ab532fcac75e59e4004","tarball":"https://registry.npmjs.org/last-run/-/last-run-1.0.0.tgz","integrity":"sha512-RSuU+7CG5J6RrZ8CGO3QkOqtz6cUl3/hLiR39eHY3YZKvvJjtOSOPcK+p1SRPwhq9cVd16a2PbckGxv314QJ4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0M9+yQXhUooQJKJj0O/OD8uqGWCANDpVhJRbqftup8AiEAgWEhctomd1WYNfzLSufNB3EpNggwODAkEWKGsHA1UyQ="}]},"directories":{}},"1.1.0":{"name":"last-run","version":"1.1.0","description":"Capture and retrieve the last time a function was run","author":{"name":"Blaine Bublitz","email":"blaine@iceddev.com","url":"http://iceddev.com"},"contributors":[],"repository":{"type":"git","url":"git+https://github.com/phated/last-run.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"test":"lab -cvL"},"dependencies":{"default-resolution":"^1.0.0","es6-weak-map":"^1.0.1"},"devDependencies":{"code":"^1.4.0","lab":"^5.5.1"},"keywords":["execution","function","last run","timing"],"gitHead":"dbbdb2f9e6172973627598a5c3ffcb001acc4ee4","bugs":{"url":"https://github.com/phated/last-run/issues"},"homepage":"https://github.com/phated/last-run#readme","_id":"last-run@1.1.0","_shasum":"a5bb65af17fc805f2751500bf4253de465e07e28","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.36","_npmUser":{"name":"phated","email":"blaine@iceddev.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"a5bb65af17fc805f2751500bf4253de465e07e28","tarball":"https://registry.npmjs.org/last-run/-/last-run-1.1.0.tgz","integrity":"sha512-iMnSVQsKOyjALryuA/NTzuA+Mb6sCVEuapeaUv3QTlQAfap+S0lzXGABm/JwULg90wPd8r/204K9O5dl6Y5O2w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmcnaW69gXyW6hPLUMQSoSZoy1ieTMe+xS10ToEUfL2gIgUg90vYaIGjRvHEtcRSHbfgGDYXRpRlAhDZ7bHvUDiVk="}]},"directories":{}},"1.1.1":{"name":"last-run","version":"1.1.1","description":"Capture and retrieve the last time a function was run","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/last-run.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint . && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"default-resolution":"^2.0.0","es6-weak-map":"^2.0.1"},"devDependencies":{"eslint":"^1.7.3","eslint-config-gulp":"^2.0.0","expect":"^1.19.0","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.3.5","jscs-preset-gulp":"^1.0.0","mocha":"^2.4.5"},"keywords":["execution","function","last run","timing"],"gitHead":"d10e2395dec464785b2c620cde8eb18d8794b628","bugs":{"url":"https://github.com/gulpjs/last-run/issues"},"homepage":"https://github.com/gulpjs/last-run#readme","_id":"last-run@1.1.1","_shasum":"45b96942c17b1c79c772198259ba943bebf8ca5b","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine@iceddev.com"}],"dist":{"shasum":"45b96942c17b1c79c772198259ba943bebf8ca5b","tarball":"https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2xkICRA9TVsSAnZWagAACAgP/A9y/LvAdQvOBjvXGB44\n+hoaTRRDT5eNNCdlvOWEELONOB5KZ8kBEDj1LK8zFeC/h04wPAIkqrox95qR\nPjXb/xy1QAraaZ8CLRhJ7+fdF6EZQUym4TdQKp0xTFlEn4tL6GyXWzIWXQXG\naAD1uuTifv/O0C6Qy0uO5k8mnKXd/aCRmwRVMTDQNdFHHGpfuE+vos/BRGQs\nuJl65ChaYQkKJTX3nnOt3M6qhIQk1rp+JPk+0n0WwlIZwCw9+pxP4jrdz2dt\n+VfvhwQW1r4gTB8Lc+DvT0dTbEFWn7kLzNpLAWncPTsKsyKeCfxLI39vvMIO\nkT7KZrqQL4FdYVXamUHC14UndziHvGXBAXnN51zn0BO5LlmCdrqWu+rdXbvf\ncrmT4BKlSq7o+rvic7kWC3HbGTAdf5Pbz4fiOCYoQ1CGr0S8ET8HNvezIIf0\nuu1YuExTwEIep+ivWkoSNVPFm6C4rxjJzsvg/DPJB99xwWWuuIFuaH49YUAQ\nJpU4rjQSbHZbzfmt6eQ1bnnbA3ILDuNgPhV6i6dZ37iOxHPUVLXzIRz1gUXs\nhTSPdGWbEwAtmyBv57XnNXhaW2wJuFAMAcDrQ6tBjVgvEzcSTfBx552L17v9\nmmSCBUVPEanpGDsEhKU37Fg6jRstANE8V/ebTSUyf+IwjeQyk8CkqEDrOK3Y\nOkcK\r\n=z7FI\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNH/t2WJLrYpnytAVSjZvFzqCqs4a9gS0RiWPcErGlrgIgYk5qBvnG5uzdw1h+La1GYRLa8f8lGXNeKyn7Mrc6Y9s="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/last-run-1.1.1.tgz_1465680171680_0.4022353799082339"},"directories":{}},"2.0.0":{"name":"last-run","version":"2.0.0","description":"Capture and retrieve the last time a function was run","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/last-run.git"},"license":"MIT","engines":{"node":">= 10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"devDependencies":{"eslint":"^7.32.0","eslint-config-gulp":"^5.0.1","eslint-plugin-node":"^11.1.0","expect":"^27.3.1","mocha":"^8.4.0","nyc":"^15.1.0"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["execution","function","last run","timing"],"gitHead":"878f48e54e934c0f3dddd85b125a123202aad506","bugs":{"url":"https://github.com/gulpjs/last-run/issues"},"homepage":"https://github.com/gulpjs/last-run#readme","_id":"last-run@2.0.0","_nodeVersion":"16.13.0","_npmVersion":"7.24.2","dist":{"integrity":"sha512-j+y6WhTLN4Itnf9j5ZQos1BGPCS8DAwmgMroR3OzfxAsBxam0hMw7J8M3KqZl0pLQJ1jNnwIexg5DYpC/ctwEQ==","shasum":"f82dcfbfce6e63d041bd83d64c82e34cdba6572e","tarball":"https://registry.npmjs.org/last-run/-/last-run-2.0.0.tgz","fileCount":4,"unpackedSize":4993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh23mMCRA9TVsSAnZWagAAHKMP/2POK01cEE8HsstL//wd\n26QqrsSIs0F4Pl5CGgkSZXEXzb1rEmH1KE+XXgX12voZcx7kJz0k4iu0IOKb\nnBlWF2vk2mc1xlTM1SVpwfMVfNPCHfahHSUUJfqUFcLPdGlblgdKluPSWKNJ\nDnu4uFC8087b41K+uytb+khbozUipl+YvNQvy85Kfv5f96KddioPYLJ2BGmY\nOYFa9JyrZw6evByA02K9YCCXI3QPv52nAo4laOsHKsDO5G+c3n+x2/d0Jnju\n8d7Br+qREOch355LZF/N7pmprN7gbC/zI4mW0bO55iea3qg8jytm9aRmevMW\nBulCz4bFCyMsqiktGqYeOstBOnMO5cYPpPit7WWJujwH0XN0sACTDwPPXXL1\nCm8GqfK3HtuY848LDr3YQGAW0g3dkIgVPeHecJDzspSKOa9DPpU8avbfCk0l\nasDVQc8PhYQ6LqWXbCX4LheGI85k/DV8RdUr2gZYf/mguQKwfGA5OA/JD3Pl\nkuyos/8DhFAL0VUn0cPgBIuLmEXElwM8h/7F+E2wkbdQFm01lO0Yk6qbc64n\nfpiVGB5aE5uBHeam/VcIVJ8YCe3IXbCMT4mj5RXFixmo/V1Iwni9N+tUvOI7\nsyQrW21a8XzIqz5ANJxnFtgYe5QRzFllMcIYpIhUzNuspNwCH1wxAmVX7axU\n3mET\r\n=3FPw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZAIrBXDIq1+jzunWCW2AisOBncuUZ+kxj1kVCdW6m+AiEAm3+3Lqsj1l6uvCtZOhgJL62mpMsG0tnMdWCp8m4DxgY="}]},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"yocontra","email":"yo@contra.io"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/last-run_2.0.0_1641773452353_0.7086853457187485"},"_hasShrinkwrap":false}},"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# last-run\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nCapture and retrieve the last time a function was run.\n\n## Usage\n\n```js\nvar lastRun = require('last-run');\n\nfunction myFunc() {}\n\nmyFunc();\n// capture the run after (or before) calling the function\nlastRun.capture(myFunc);\n\n// retrieve the last run time\nlastRun(myFunc);\n//-> outputs the Date.now() when capture was called\n```\n\n## API\n\n### lastRun(fn, [timeResolution]) => [Timestamp]\n\nTakes a function (`fn`) and returns a timestamp of the last time the function was captured.\n\nReturns undefined if the function has not been captured.\n\nThe timestamp is always given in millisecond but the time resolution can be reduced (rounded down).\nThe use case is to be able to compare a build time to a file time attribute.\nOn some file systems, `fs.stat` time attributes like `mtime` might have one second precision.\n\n### lastRun.capture(fn, [timestamp])\n\nTakes a function (`fn`) and captures the current timestamp with `Date.now()`.\nIf passed the optional timestamp, captures that time instead of `Date.now()`.\nThe captured timestamp can then be retrieved using the `lastRun` function.\n\n### lastRun.release(fn)\n\nTakes a function (`fn`) and removes the last run timestamp for it.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/last-run.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/last-run\n[npm-image]: https://img.shields.io/npm/v/last-run.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/last-run/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/last-run/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/last-run\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/last-run/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n","maintainers":[{"name":"yocontra","email":"yo@contra.io"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"time":{"modified":"2022-06-19T10:46:16.253Z","created":"2015-04-11T23:53:57.075Z","0.1.0":"2015-04-11T23:53:57.075Z","0.1.1":"2015-04-12T01:04:20.473Z","0.2.0":"2015-04-12T01:12:23.610Z","1.0.0":"2015-04-15T06:22:47.282Z","1.1.0":"2015-06-12T01:23:12.620Z","1.1.1":"2016-06-11T21:22:54.284Z","2.0.0":"2022-01-10T00:10:52.492Z"},"homepage":"https://github.com/gulpjs/last-run#readme","keywords":["execution","function","last run","timing"],"repository":{"type":"git","url":"git+https://github.com/gulpjs/last-run.git"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"bugs":{"url":"https://github.com/gulpjs/last-run/issues"},"license":"MIT","readmeFilename":"README.md"}