{"_id":"@byzanteam/timer","_rev":"10-a09cf6b4994293ae1adb112d77b27d2e","name":"@byzanteam/timer","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.1":{"name":"@byzanteam/timer","version":"0.1.1","keywords":["Carbonium","Timer"],"author":{"name":"vanppo","email":"vanppo@hotmail.com"},"license":"MIT","_id":"@byzanteam/timer@0.1.1","maintainers":[{"name":"leecason","email":"leecason0722@gmail.com"},{"name":"byzan.dev","email":"dev@byzan.team"},{"name":"idcjaja","email":"838927992@qq.com"},{"name":"admiral.coco","email":"solar.pom@gmail.com"},{"name":"vanppo","email":"vanppo@hotmail.com"}],"homepage":"https://github.com/Byzanteam/timer#readme","bugs":{"url":"https://github.com/Byzanteam/timer/issues"},"dist":{"shasum":"a3513b1e2f86186af7eb4e2e56a9e5d1daed2e24","tarball":"https://registry.npmjs.org/@byzanteam/timer/-/timer-0.1.1.tgz","fileCount":6,"integrity":"sha512-6MgqB29IawUTXu725eYTV/byim8QU0egV90Lpf494PmpqEIe7yk/CwEEw5dJxb90+2HZ+7QG2uAEPxOkZX8auA==","signatures":[{"sig":"MEQCIB0ROMPXGXJwtWajb3w4zW47Pl+9uSJmEZw/nLE2ZT0iAiB2GZ75fJLItj7bgulM8wtjeMRbbq441nmCuAGarQ4e9Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu2RZCRA9TVsSAnZWagAAG3UP/3/dMjl+kAYY88q+S4dJ\ntlQi3f6BT1jn9Kd3937PJmiINPwPO6cekAzDNQYzZ5qLNy1Jp5lQ2tkF6//I\nbZ/qKQe60DuId7E7QGfNMUvoqLDjoFA8sbkGLTwgRuc/YdWTP0ITkVMThEtk\n2YhoeibLA9BZX6pI4nq+RUoF7Dp2JKzDkl3lR2yQDryQhbcFWFQ4loHUgnY6\nUBqPGq3Eqi2J9sOQkJ8Cm2knJmtiBLS+WgaxT+qyBihZm5dVMeV4ked6AzqO\nLea+P7GdSDOAgWBltsICEczxfIDqDTS0UncMeV/2jAsLDcF1VrYv1DukFLjx\ndN0uo6B3Bp7ILnPKJperCAnW9TakFgH02t1xBxTaxGZtoJMehjOYBJFMgV8N\n3X2mlhDsAp0LJjqmYdcs8xyLVSoVsVS0Lnn5ZLwiAdpOMdD9FbDw4H6GH+bo\nD0DZ1WZBPGbu06d75PJ3uCMavq4Q5/f4W7DFhjePy/w7koFaj6NWdPrSRfbs\nyM+sSz5DbWZLJiXzhaVNyinVNMOgV6gq+KR8/9fR7JYaU+vRMwx9kmyPdCE7\nFRhDEB1dsY7wqwGXYRI82hYyHHFfe+6a5amIjpsMOQ9D22tsYQ3TFDPPed+U\nbTjiVZJlBYJdQc4hSLcxaYA98fjMSYq1JsMt6Bus8yLjMjrlTF7uBixdYS+C\nI9/j\r\n=fwAa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/index.es.js","gitHead":"ad8c9971dea7ce0ab177bf2066ac0596f346659a","scripts":{"lint":"eslint --ext=.js,.ts --fix src test","test":"jest","build":"rollup -c rollup.config.js","lint:ci":"eslint --ext=.js,.ts src test","prepack":"npm run build"},"_npmUser":{"name":"byzan.dev","email":"dev@byzan.team"},"repository":{"url":"git+https://github.com/Byzanteam/timer.git","type":"git"},"_npmVersion":"6.14.4","description":"Timer for Carbonium","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bezier-easing":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.5.4","tslib":"^1.11.2","eslint":"^6.8.0","rollup":"^2.9.1","ts-jest":"^25.5.1","typescript":"^3.8.3","@types/jest":"^25.2.1","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-typescript":"^4.1.1","@typescript-eslint/parser":"^2.33.0","@rollup/plugin-node-resolve":"^7.1.3","@typescript-eslint/eslint-plugin":"^2.33.0","@byzanteam/eslint-config-typescript":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/timer_0.1.1_1589339224976_0.31731269520827876","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@byzanteam/timer","version":"0.1.2","keywords":["Carbonium","Timer"],"author":{"name":"vanppo","email":"vanppo@hotmail.com"},"license":"MIT","_id":"@byzanteam/timer@0.1.2","maintainers":[{"name":"admiral.coco","email":"solar.pom@gmail.com"},{"name":"byzan.dev","email":"dev@byzan.team"},{"name":"idcjaja","email":"838927992@qq.com"},{"name":"leecason","email":"leecason0722@gmail.com"},{"name":"vanppo","email":"vanppo@hotmail.com"}],"homepage":"https://github.com/Byzanteam/timer#readme","bugs":{"url":"https://github.com/Byzanteam/timer/issues"},"dist":{"shasum":"270eabb73d531f092ed5c9ac178310522a618180","tarball":"https://registry.npmjs.org/@byzanteam/timer/-/timer-0.1.2.tgz","fileCount":6,"integrity":"sha512-Vv0+XcFLS5mlBKnFwOf2Fl3KnfpGaKUZlsVTqiIjAHICbqtttuf3IiqdU+zTUwGlf0fkzNEB4kRYgKOrGrsR4Q==","signatures":[{"sig":"MEUCIQDadLtY+vvQpZLkM7kcAJZSKy6B30shtiKuz1T34jzODQIgVgRRBRzQbxloCMo9AQuoDSJU8SrAlJM4cJOiH5UGAW8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu5JzCRA9TVsSAnZWagAApLgQAI5fosZZBLdZlb7x3T1/\nIWJxAR2LYHwTTYgVdxjUJ/Cs5KgVhauSYu+2wBSG8JlO2PJ6LwJP6X4fxCV4\n+I/tEWft/Jbru4npn4Rjhg1iQ0AY2oGaFO1cKzDhyKAPj8UNCStGh6Nost89\nHI4VOH7QEm1mCgWXl9BjVyV+CqSOlVSS5fazAkiHDtfdUtWuLd+VWs4XpzUz\nyUliMLz4gs0Cbyu6FKMjw4btXiOIU8TXl0f3yDIXQM4oRb9Q8wDrkf8Af4es\nwgOXV5vo4tt/+qD9uW6NvrqjXNDxD7wt0S8rpWW5TT367YW/brzkzeYb+/SS\nQjLXpLpz9jRU2CAzDDPKXGlhaNDRt2ai/40XXy+ains2Ie5M3zCNKW5ss/zb\n/DxSQcmoFp+xANwend0eY/bIZ/8rSmMdh0jHLUpDNKhDqev/QsmkYCOcDlxK\n7uOApTea+gb61rLgJI9cZ8uCYElE/jP3csARyyhYPH1ltojX6dSCRGR9OcKL\nRAbrzgFdivEKP6S2nWt1iDbsYyqU77jiggZkqEKkOnfYza5coYcUQsx8LWVA\nLhHKGVHfrx/u/Y3e5/BD9xvJpgXhxMhLu16GyG2CuQ04nHwDgyUqBm9DeL7A\n2zPJV2NtbWayNeZBipdv3Sl3TAIbarenEaP3WgO1lrkjmdq8mdj668EtNdWT\nZreu\r\n=QzhN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"types/index.d.ts","module":"dist/index.es.js","gitHead":"d2ea74afbefa9582d2631d3e48f080e29bd38966","scripts":{"lint":"eslint --ext=.js,.ts --fix src test","test":"jest","build":"rollup -c rollup.config.js","lint:ci":"eslint --ext=.js,.ts src test","prepack":"npm run build","postbuild":"tsc -d --emitDeclarationOnly --esModuleInterop --outDir types src/index.ts"},"_npmUser":{"name":"byzan.dev","email":"dev@byzan.team"},"repository":{"url":"git+https://github.com/Byzanteam/timer.git","type":"git"},"_npmVersion":"6.14.4","description":"Timer for Carbonium","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bezier-easing":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.5.4","tslib":"^1.11.2","eslint":"^6.8.0","rollup":"^2.9.1","ts-jest":"^25.5.1","typescript":"^3.8.3","@types/jest":"^25.2.1","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-typescript":"^4.1.1","@typescript-eslint/parser":"^2.33.0","@rollup/plugin-node-resolve":"^7.1.3","@typescript-eslint/eslint-plugin":"^2.33.0","@byzanteam/eslint-config-typescript":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/timer_0.1.2_1589351026559_0.6284940137170059","host":"s3://npm-registry-packages"}},"0.1.3":{"name":"@byzanteam/timer","version":"0.1.3","keywords":["Carbonium","Timer"],"author":{"name":"vanppo","email":"vanppo@hotmail.com"},"license":"MIT","_id":"@byzanteam/timer@0.1.3","maintainers":[{"name":"admiral.coco","email":"solar.pom@gmail.com"},{"name":"byzan.dev","email":"dev@byzan.team"},{"name":"idcjaja","email":"838927992@qq.com"},{"name":"leecason","email":"leecason0722@gmail.com"},{"name":"vanppo","email":"vanppo@hotmail.com"}],"homepage":"https://github.com/Byzanteam/timer#readme","bugs":{"url":"https://github.com/Byzanteam/timer/issues"},"dist":{"shasum":"f600a9a7a68023f2f0130a40458dd95ac27be982","tarball":"https://registry.npmjs.org/@byzanteam/timer/-/timer-0.1.3.tgz","fileCount":10,"integrity":"sha512-9YSpd2BnrTNIgTg674qhn1gjZc9GJrC+fxHIygWaHBH03kMLpmhwaWPXsSZ8zuLj/XooPgrapmYSlZOP941NJQ==","signatures":[{"sig":"MEUCIF+2VqkxQyNN+x608lzLZVXQK4IAaRyT5LHPlZG/jmN0AiEA7CUtVi+MTbj/mQcWUnXAK/zWzQK00nzSnf/9xNXZb+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu5NsCRA9TVsSAnZWagAAgk4P/i3FS/e5OpIjO0moD28k\nQ6sWFc86XZmKrUvHpDzH0f/NpF5ogH3ATdptYfZ2iYGQJYOOnuKJ2RrQOovI\nnVH4aFWhQ3HemP3z5UtU+jN0xJ3aUODr002mt8Rm9dQYhsZKkMPlxnAGrix2\nvczrQQLcvnjUPPQAjyK0kriU880pIYj29EVVDoTewGs8DqSIiovcAmZHsyu/\nCyA4u7niYD9MXOsAjKHl/fl4uiKr0DH7WNnYBJ9EyjiRvjS5KW3S88eoSXgs\nU5gBrAB5azm3TqQnzTO5lJg2s6R3e1s7xf/2h+DnsaLbbUBpfBUk3oJkSSuK\noALSqIzzHR6LXvFdX/qzV/6Ujrg50gPSHGx51hru5Fw6Kye+xxk73h1LqCRf\nNC6fNDvb6Tf9zvd9gjj5hwtEp97aAKAGN0QVCk1MmKKAtlE8qLArhIQCNSRG\naeOY7YBaoEQnhnXNaEvWes6vzCtjkunRIwNTgNN/k3XiMt55ifzgwxo90JwV\nv0gkQRVMRKi8IimECqxbWgcMXaAS+D526GLt4I+NmQQBu2pT1ozvTj6D0pYv\n5KNaMBN1NxmggUmVm6wIfCcB4Ib7TLy0jupwHAL3OxGI5TecJfP+1vrz4ydS\nE9/yfyUgIdYwTeeb35HHdVxtVPjddchMAn9ZIdu3p3Fs3OCiYrg4fl4Tt3sW\njPi4\r\n=InLl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"types/index.d.ts","module":"dist/index.es.js","gitHead":"8a9457dc1654caf7dd3e1d94f8768d70e86d3e26","scripts":{"lint":"eslint --ext=.js,.ts --fix src test","test":"jest","build":"rollup -c rollup.config.js","lint:ci":"eslint --ext=.js,.ts src test","prepack":"npm run build","postbuild":"tsc -d --emitDeclarationOnly --esModuleInterop --outDir types src/index.ts"},"_npmUser":{"name":"byzan.dev","email":"dev@byzan.team"},"repository":{"url":"git+https://github.com/Byzanteam/timer.git","type":"git"},"_npmVersion":"6.14.4","description":"Timer for Carbonium","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bezier-easing":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.5.4","tslib":"^1.11.2","eslint":"^6.8.0","rollup":"^2.9.1","ts-jest":"^25.5.1","typescript":"^3.8.3","@types/jest":"^25.2.1","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-typescript":"^4.1.1","@typescript-eslint/parser":"^2.33.0","@rollup/plugin-node-resolve":"^7.1.3","@typescript-eslint/eslint-plugin":"^2.33.0","@byzanteam/eslint-config-typescript":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/timer_0.1.3_1589351276067_0.8420691013779249","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@byzanteam/timer","version":"0.2.0","keywords":["Carbonium","Timer"],"author":{"name":"vanppo","email":"vanppo@hotmail.com"},"license":"MIT","_id":"@byzanteam/timer@0.2.0","maintainers":[{"name":"admiral.coco","email":"solar.pom@gmail.com"},{"name":"byzan.dev","email":"dev@byzan.team"},{"name":"idcjaja","email":"838927992@qq.com"},{"name":"leecason","email":"leecason0722@gmail.com"},{"name":"vanppo","email":"vanppo@hotmail.com"}],"homepage":"https://github.com/Byzanteam/timer#readme","bugs":{"url":"https://github.com/Byzanteam/timer/issues"},"dist":{"shasum":"0599f74491131fb3636ddec8b5f42f9844ce19ee","tarball":"https://registry.npmjs.org/@byzanteam/timer/-/timer-0.2.0.tgz","fileCount":10,"integrity":"sha512-EAtvVB+YyQdrQL8Q9fwldcHY/q1WdZacVk0JBaLzA4uvRShnqNLXlXZIFZye1gxBjQpYHUmx4vBkLB3ldpaMRA==","signatures":[{"sig":"MEQCIFhGdd0+fEbUG2FhoQGPN+hdZn2wlxZc6FINhiH/E/dWAiAuss9jQvpLsV0mX5kM4Qve0S4r1HVJOQQdm20Vme5HpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu6u7CRA9TVsSAnZWagAAqlAP/RK8NlNfUjjojKavfPoj\nBUYCNIvXhZ8RH2RX9WtTUL4qlDKfBKSUoiLJNvUTp+67E7s++pMyrE7Ui6us\ngcaLG52Hyef2kzhaXrUwj49Wpoa1NE5ky+LZrd5rEJxt1JoD24RFCrxTIy0y\nrG0TISPuG2dwL4xjXLHWXgLoTic0XO2pAECi9w0v1tuYvUlB8xSjbXyjrvTI\nlpbBQCWsxOKCxSvwztMQfHR2UhybvF+ycxWA5Li5mwGgwEt6ttUh4bk5+gyH\n03CPlzY1mjK/q3LfRP3/NBe2heZQg7EMj2xg9Z0VA8l+wIFiVmquQz92AUvI\nWGdKBHpY/7FVkRdZ/SZosv5uy5PTo6c6HTpzcHvQsT3xBdXdFKwMlHBDtWY3\nFCNmpnRtrbplrhoUahkoMXT1dXWSHu5gwI3KcSWs13IDVNulBmbGSuOeJCkC\niMGSobxTVfJPoc072qPVyV4ZuPGQxwyliSW/i9uETBoroaI1zbuGmjzuvq3g\nAeLKqwtTjTqcTNM0BWt/O1Bx/tl08nBi1ZAPWR7P+JSVkBfPPNxW/BcVtcUF\nMax5lSLGmYxPHZa1KliCMDn59P98/k27lupOut//kbNp9iTgogBAaBnCZdD4\ng5oSqGZbY9hnvQ2ZFvsQUxECkNkKsRv0ZpPsZKrrhlUztu8xq6o2VpNrxKPp\nXv8R\r\n=PFMM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"types/index.d.ts","module":"dist/index.es.js","gitHead":"076e9a67bca8d01fc01ad586e5926ca516b59a91","scripts":{"lint":"eslint --ext=.js,.ts --fix src test","test":"jest","build":"rollup -c rollup.config.js","lint:ci":"eslint --ext=.js,.ts src test","prepack":"npm run build","postbuild":"tsc -d --emitDeclarationOnly --esModuleInterop --outDir types src/index.ts"},"_npmUser":{"name":"byzan.dev","email":"dev@byzan.team"},"repository":{"url":"git+https://github.com/Byzanteam/timer.git","type":"git"},"_npmVersion":"6.14.4","description":"Timer for Carbonium","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bezier-easing":"^2.1.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^25.5.4","tslib":"^1.11.2","eslint":"^6.8.0","rollup":"^2.9.1","ts-jest":"^25.5.1","typescript":"^3.8.3","@types/jest":"^25.2.1","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-typescript":"^4.1.1","@typescript-eslint/parser":"^2.33.0","@rollup/plugin-node-resolve":"^7.1.3","@typescript-eslint/eslint-plugin":"^2.33.0","@byzanteam/eslint-config-typescript":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/timer_0.2.0_1589357492087_0.9484589571243653","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-05-13T03:07:04.724Z","modified":"2026-05-24T05:37:15.270Z","0.1.1":"2020-05-13T03:07:05.121Z","0.1.2":"2020-05-13T06:23:46.675Z","0.1.3":"2020-05-13T06:27:56.242Z","0.2.0":"2020-05-13T08:11:32.290Z"},"bugs":{"url":"https://github.com/Byzanteam/timer/issues"},"author":{"name":"vanppo","email":"vanppo@hotmail.com"},"license":"MIT","homepage":"https://github.com/Byzanteam/timer#readme","keywords":["Carbonium","Timer"],"repository":{"url":"git+https://github.com/Byzanteam/timer.git","type":"git"},"description":"Timer for Carbonium","maintainers":[{"email":"solar.pom@gmail.com","name":"admiral.coco"},{"email":"dev@byzan.team","name":"byzan.dev"},{"email":"06fahchen@gmail.com","name":"fahchen"}],"readme":"# timer\n\nTimer support for Carbonium.\n\n## Installation\n\n```bash\n$ npm install @byzanteam/timer\n```\n\n## Usage\n\n### Create Timer\n\n```typescript\nimport { createTimer } from '@byzanteam/timer'\n\nconst timer = createTimer()\n\n// Create timer with given defaults.\nconst timer = createTimer({ delay: 0, duration: 1e3, easingFunction: 'easeInOut' })\n```\n\n### Subscribe\n\n`timer.subscribe()` 向 timer 中添加任务，返回退订函数。调用退订函数会从任务队列中移除相关的所有任务。该函数一共有两种调用形式，如下所示。\n\n```typescript\nconst handler = (progress: number) => {\n  // Do something with the progress...\n}\n\n// 单个任务配置对象。\ntimer.subscribe({ duration: 2e3, handler })\n\n// 多个任务配置对象数组。\nconst unsubscribe = timer.subscribe([\n  {\n    delay: 250,\n    handler,\n  },\n  {\n    duration: 250,\n    handler,\n  }\n])\n\n// 调用 unsubscribe 函数会移除订阅的所有任务。\nunsubscribe()\n```\n","readmeFilename":"README.md"}