{"_id":"timers-browserify-full","_rev":"10-2b3c50e26dd68a5e1251b2a07c2ca2dd","name":"timers-browserify-full","description":"timers module based on nodes code for browserify","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0":{"name":"timers-browserify-full","description":"timers module based on nodes code for browserify","version":"0.0.0","author":{"name":"Jan Schär","email":"jscissr@gmail.com"},"bugs":{"url":"https://github.com/jscissr/timers-browserify-full/issues"},"contributors":[],"devDependencies":{"async":"^0.9.0","concat-stream":"^1.4.7","hyperquest":"^1.0.1","split":"^0.3.3","tape":"^3.5.0","tape-catch":"^1.0.4","through2":"^0.6.3","zuul":"^1.17.1"},"homepage":"https://github.com/jscissr/timers-browserify-full","keywords":["timers","timer","setTimeout","setInterval","setImmediate","browserify","compatible","browser"],"license":"MIT","main":"timers.js","repository":{"type":"git","url":"https://github.com/jscissr/timers-browserify-full.git"},"scripts":{"test":"node ./bin/test.js","test-browser":"zuul -- all-tests.js","test-browser-local":"zuul --local -- all-tests.js","test-node":"tape test/*.js","size":"browserify -r ./ | uglifyjs -c -m | gzip | wc -c"},"gitHead":"2ea6e0ed7414112f15a62e9dc0cb4aed48dbac93","_id":"timers-browserify-full@0.0.0","_shasum":"64d5ef63139b70937fcd8144a13e42f0ba80e324","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jscissr","email":"jscissr@gmail.com"},"maintainers":[{"name":"jscissr","email":"jscissr@gmail.com"}],"dist":{"shasum":"64d5ef63139b70937fcd8144a13e42f0ba80e324","tarball":"https://registry.npmjs.org/timers-browserify-full/-/timers-browserify-full-0.0.0.tgz","integrity":"sha512-lhlejGNSPWlmHsNKyIaoKb2XKu5znT7PjtHtrLRuHsJJxbpzkdlIu5Fg2+rPkh2RP/ZtUZ5nCE3Bczo1GIqIuQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvhjzknKCMpNQUZoMB6BAfCbHBKWo3JF9/FsEbIuj3GgIgdaGnCZuEf2gffzg5lwkrb2q8WIxE+q27yyfIaFMOR9U="}]}},"0.0.1":{"name":"timers-browserify-full","description":"timers module based on nodes code for browserify","version":"0.0.1","author":{"name":"Jan Schär","email":"jscissr@gmail.com"},"bugs":{"url":"https://github.com/jscissr/timers-browserify-full/issues"},"contributors":[],"devDependencies":{"async":"^0.9.0","concat-stream":"^1.4.7","hyperquest":"^1.0.1","split":"^0.3.3","tape":"^3.5.0","tape-catch-onerror":"^1.0.3","through2":"^0.6.3","zuul":"^1.17.1"},"homepage":"https://github.com/jscissr/timers-browserify-full","keywords":["timers","timer","setTimeout","setInterval","setImmediate","browserify","compatible","browser"],"license":"MIT","main":"timers.js","repository":{"type":"git","url":"https://github.com/jscissr/timers-browserify-full.git"},"scripts":{"test":"node ./bin/test.js","test-browser":"zuul -- all-tests.js","test-browser-local":"zuul --local -- all-tests.js","test-node":"tape test/*.js","size":"browserify -r ./ | uglifyjs -c -m | gzip | wc -c"},"gitHead":"e45db524a1dce3bc6b6d063454b75c0c1d896199","_id":"timers-browserify-full@0.0.1","_shasum":"64dd98e7b715ecf95d21b0760e13954001acfb90","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jscissr","email":"jscissr@gmail.com"},"maintainers":[{"name":"jscissr","email":"jscissr@gmail.com"}],"dist":{"shasum":"64dd98e7b715ecf95d21b0760e13954001acfb90","tarball":"https://registry.npmjs.org/timers-browserify-full/-/timers-browserify-full-0.0.1.tgz","integrity":"sha512-ObHibM8vle4WwhDV36UkI3hOhXs1LdiY/W7moztH8vASaiZkyR5/b98GtSZ+sZK916gez94jQGKss0wSC5B4Uw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLBldJW5SQR+us0ChKqdyf2kn4cbxXToOo2SSA2ISgGAiEArJdH0lIZYe+ory7e1XnUj8PtB7VYb22T1MaGq5Xh9PM="}]}}},"readme":"# timers-browserify-full [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url]\r\n\r\n[![saucelabs][saucelabs-image]][saucelabs-url]\r\n\r\n[travis-image]: https://img.shields.io/travis/jscissr/timers-browserify-full.svg?style=flat\r\n[travis-url]: https://travis-ci.org/jscissr/timers-browserify-full\r\n[npm-image]: https://img.shields.io/npm/v/timers-browserify-full.svg?style=flat\r\n[npm-url]: https://npmjs.org/package/timers-browserify-full\r\n[downloads-image]: https://img.shields.io/npm/dm/timers-browserify-full.svg?style=flat\r\n[saucelabs-image]: https://saucelabs.com/browser-matrix/timers-full.svg\r\n[saucelabs-url]: https://saucelabs.com/u/timers-full\r\n\r\nThis module is based on the original source files of node v0.12.0. This means that it is\r\nas compatible to node as possible, and it also uses linked lists like node. But\r\nit also means that it is quite heavy, and not necessary for most browserify\r\nprojects. If you don't heavily use timers, the [timers-browserify](https://www.npmjs.com/package/timers-browserify)\r\nmodule, which is already integrated in browserify, is probably better suited.\r\n\r\nSize: 1.73KB gzipped (4.45KB uncompressed)\r\n\r\n## install / usage with browserify\r\n\r\n```bash\r\nnpm install timers-browserify-full\r\n```\r\n\r\nTo use it with browserify, you have to use the js API of browserify;\r\nthe command line API does not support changing builtins.\r\n\r\nExample:\r\n\r\n```js\r\nvar browserify = require('browserify');\r\n\r\nvar builtins = require('browserify/lib/builtins.js');\r\nbuiltins.timers = require.resolve('timers-browserify-full');\r\n\r\nvar b = browserify();\r\n\r\nb.add(...\r\n```\r\n\r\nThe above example will use timers-browserify-full for all browserify builds.\r\nIf you only want it for a specific build of a larger build script:\r\n\r\n```js\r\nvar browserify = require('browserify');\r\n\r\nvar builtins = require('browserify/lib/builtins.js');\r\nvar myBuiltins = {};\r\nObject.keys(builtins).forEach(function(key) {\r\n  myBuiltins[key] = builtins[key];\r\n});\r\n\r\nmyBuiltins.timers = require.resolve('timers-browserify-full')\r\n\r\nvar b = browserify({builtins: myBuiltins});\r\n\r\nb.add(...\r\n```\r\n\r\n## globals\r\n\r\nIn node, the functions setTimeout, clearTimeout, setInterval, clearInterval,\r\nsetImmediate & clearImmediate are added to the global namespace. I don't\r\nrecommend doing this in the browser, because it overrides the native functions.\r\nBut you can use the following snippet *inside* your modules — this doesn't touch\r\nthe global namespace:\r\n\r\n\r\n```js\r\nvar timers = require('timers');\r\n\r\nvar setTimeout = timers.setTimeout,\r\n    clearTimeout = timers.clearTimeout,\r\n    setInterval = timers.setInterval,\r\n    clearInterval = timers.clearInterval,\r\n    setImmediate = timers.setImmediate,\r\n    clearImmediate = timers.clearImmediate;\r\n```\r\n\r\n## credit\r\n\r\nThe two main files, timers.js and _linklist.js, are of course based on [joyent/node](https://github.com/joyent/node);\r\nthe _linklist.js file is even untouched!\r\n\r\nThe two scripts in `bin` are borrowed from [feross/buffer](https://github.com/feross/buffer) with modifications.\r\n\r\n## license\r\n\r\nMIT","maintainers":[{"name":"jscissr","email":"jscissr@gmail.com"}],"time":{"modified":"2022-06-27T06:50:16.794Z","created":"2015-02-11T22:51:24.943Z","0.0.0":"2015-02-11T22:51:24.943Z","0.0.1":"2015-02-12T16:30:21.057Z"},"homepage":"https://github.com/jscissr/timers-browserify-full","keywords":["timers","timer","setTimeout","setInterval","setImmediate","browserify","compatible","browser"],"repository":{"type":"git","url":"https://github.com/jscissr/timers-browserify-full.git"},"contributors":[],"author":{"name":"Jan Schär","email":"jscissr@gmail.com"},"bugs":{"url":"https://github.com/jscissr/timers-browserify-full/issues"},"license":"MIT","readmeFilename":"README.md","users":{}}