{"_id":"nosleep.js","_rev":"2926687","name":"nosleep.js","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","dist-tags":{"latest":"0.12.0"},"maintainers":[{"name":"npm:richt","email":""}],"time":{"modified":"2023-03-03T06:03:48.000Z","created":"2016-04-11T11:20:13.146Z","0.12.0":"2020-12-16T00:20:21.034Z","0.11.0":"2020-05-28T13:47:31.964Z","0.10.0":"2020-05-27T22:09:55.443Z","0.9.0":"2018-12-04T08:29:28.444Z","0.8.0":"2018-11-30T02:13:55.161Z","0.7.0":"2017-07-06T13:09:21.152Z","0.5.1":"2016-04-11T11:20:13.146Z"},"users":{},"author":{"name":"Rich Tibbett"},"repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"versions":{"0.12.0":{"name":"nosleep.js","version":"0.12.0","author":{"name":"Rich Tibbett"},"license":"MIT","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","keywords":["nosleep","wake lock","wakelock","screen","display","sleep"],"main":"dist/NoSleep.min.js","module":"src/index.js","types":"nosleep.d.ts","repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-env":"^1.7.0","prettier":"^2.0.5","terser-webpack-plugin":"^3.0.2","webpack":"^4.44.0","webpack-cli":"^3.3.11"},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"scripts":{"lint":"prettier --check src","build":"npm run lint && webpack"},"gitHead":"07fcee254724ab1b79076fbc22f3dd447649a2eb","_id":"nosleep.js@0.12.0","_nodeVersion":"14.3.0","_npmVersion":"6.14.5","dist":{"shasum":"a01fddab2c13af357d673928b1f40a9013a4dc08","size":18691,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.12.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.12.0.tgz"},"_npmUser":{"name":"richt","email":"rich.tibbett@gmail.com"},"directories":{},"maintainers":[{"name":"npm:richt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nosleep.js_0.12.0_1608078020849_0.4692025715932373"},"_hasShrinkwrap":false,"publish_time":1608078021034,"_cnpm_publish_time":1608078021034,"_cnpmcore_publish_time":"2021-12-16T13:22:40.999Z"},"0.11.0":{"name":"nosleep.js","version":"0.11.0","author":{"name":"Rich Tibbett"},"license":"MIT","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","keywords":["nosleep","wake lock","wakelock","screen","display","sleep"],"main":"dist/NoSleep.min.js","module":"src/index.js","types":"nosleep.d.ts","repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-env":"^1.7.0","prettier":"^2.0.5","terser-webpack-plugin":"^3.0.2","webpack":"^4.43.0","webpack-cli":"^3.3.11"},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"scripts":{"lint":"prettier --check src","build":"npm run lint && webpack"},"gitHead":"3823168560b234f405428774989328346fed1308","_id":"nosleep.js@0.11.0","_nodeVersion":"14.3.0","_npmVersion":"6.14.5","dist":{"shasum":"4e03af6751d7a969ceade0c45a1b481887b2b0c2","size":15320,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.11.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.11.0.tgz"},"maintainers":[{"name":"npm:richt","email":""}],"_npmUser":{"name":"richt","email":"rich.tibbett@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nosleep.js_0.11.0_1590673651769_0.2915495227709941"},"_hasShrinkwrap":false,"publish_time":1590673651964,"_cnpm_publish_time":1590673651964,"_cnpmcore_publish_time":"2021-12-16T13:22:41.306Z"},"0.10.0":{"name":"nosleep.js","version":"0.10.0","author":{"name":"Rich Tibbett"},"license":"MIT","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","keywords":["nosleep","wake lock","wakelock","screen","display","sleep"],"main":"dist/NoSleep.min.js","module":"src/index.js","types":"nosleep.d.ts","repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-env":"^1.7.0","prettier":"^2.0.5","terser-webpack-plugin":"^3.0.2","webpack":"^4.43.0","webpack-cli":"^3.3.11"},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"scripts":{"lint":"prettier --check src","build":"npm run lint && webpack"},"gitHead":"5f703dc30d3dd1721bff767755cf54269cb1ed17","_id":"nosleep.js@0.10.0","_nodeVersion":"14.3.0","_npmVersion":"6.14.5","dist":{"shasum":"6043d59757bb5989665aa06e52b6ec6874818c01","size":14725,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.10.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.10.0.tgz"},"maintainers":[{"name":"npm:richt","email":""}],"_npmUser":{"name":"richt","email":"rich.tibbett@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nosleep.js_0.10.0_1590617395283_0.9391516113705756"},"_hasShrinkwrap":false,"publish_time":1590617395443,"_cnpm_publish_time":1590617395443,"_cnpmcore_publish_time":"2021-12-16T13:22:41.537Z"},"0.9.0":{"name":"nosleep.js","version":"0.9.0","author":{"name":"Rich Tibbett"},"license":"MIT","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","keywords":["nosleep","wake lock","wakelock","screen","display","sleep"],"main":"dist/NoSleep.min.js","module":"src/index.js","repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"devDependencies":{"babel-core":"^6.25.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","babel-preset-env":"^1.7.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","standard":"^10.0.2","standard-loader":"^6.0.1","webpack":"^3.0.0"},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"scripts":{"lint":"eslint src","build":"npm run lint && webpack"},"gitHead":"9f5cd9d98de846aec760c8abd3f177248bd680df","_id":"nosleep.js@0.9.0","_npmVersion":"6.4.1","_nodeVersion":"9.8.0","_npmUser":{"name":"richt","email":"rich.tibbett@gmail.com"},"dist":{"shasum":"0f1371b81dc182e3b6bbdb837e880f16db9d7163","size":8903,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.9.0.tgz"},"maintainers":[{"name":"npm:richt","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nosleep.js_0.9.0_1543912168332_0.2259109948054574"},"_hasShrinkwrap":false,"publish_time":1543912168444,"_cnpm_publish_time":1543912168444,"_cnpmcore_publish_time":"2021-12-16T13:22:42.089Z"},"0.8.0":{"name":"nosleep.js","version":"0.8.0","author":{"name":"Rich Tibbett"},"license":"MIT","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","keywords":["nosleep","wake lock","wakelock","screen","display","sleep"],"main":"dist/NoSleep.min.js","module":"src/index.js","repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"devDependencies":{"babel-core":"^6.25.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","babel-preset-env":"^1.7.0","eslint":"^5.9.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^8.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-standard":"^4.0.0","standard":"^10.0.2","standard-loader":"^6.0.1","webpack":"^3.0.0"},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"scripts":{"lint":"eslint src","build":"npm run lint && webpack"},"gitHead":"1c28f05cee87aa44c64677033bb5e1881cb8325b","_id":"nosleep.js@0.8.0","_npmVersion":"6.4.1","_nodeVersion":"9.8.0","_npmUser":{"name":"richt","email":"rich.tibbett@gmail.com"},"dist":{"shasum":"924f525ab799bbb1fe7655d7cf571ee359bb68da","size":8051,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.8.0.tgz"},"maintainers":[{"name":"npm:richt","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nosleep.js_0.8.0_1543544034952_0.6151265580808796"},"_hasShrinkwrap":false,"publish_time":1543544035161,"_cnpm_publish_time":1543544035161,"_cnpmcore_publish_time":"2021-12-16T13:22:42.321Z"},"0.7.0":{"name":"nosleep.js","version":"0.7.0","author":{"name":"Rich Tibbett"},"license":"MIT","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser","keywords":["nosleep","wake lock","wakelock","screen","display","sleep"],"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/richtr/NoSleep.js.git"},"devDependencies":{"babel-core":"^6.25.0","babel-eslint":"^7.2.3","babel-loader":"^7.1.1","babel-preset-es2015":"^6.24.1","standard":"^10.0.2","standard-loader":"^6.0.1","webpack":"^3.0.0"},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"scripts":{"build":"webpack"},"gitHead":"b7f921d0549013e788ff492ef1fa4343ecd82afc","_id":"nosleep.js@0.7.0","_shasum":"cfd919c25523ca0d0f4a69fb3305c083adaee289","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"richt","email":"rich.tibbett@gmail.com"},"dist":{"shasum":"cfd919c25523ca0d0f4a69fb3305c083adaee289","size":8030,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.7.0.tgz"},"maintainers":[{"name":"npm:richt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nosleep.js-0.7.0.tgz_1499346560208_0.5844409291166812"},"directories":{},"publish_time":1499346561152,"_hasShrinkwrap":false,"_cnpm_publish_time":1499346561152,"_cnpmcore_publish_time":"2021-12-16T13:22:42.544Z"},"0.5.1":{"name":"nosleep.js","version":"0.5.1","description":"Prevent display sleep and enable wake lock in any Android or iOS web browser.","main":"NoSleep.js","repository":{"type":"git","url":"git+https://github.com/lmk123/NoSleep.js.git"},"license":"MIT","gitHead":"a4d74ed0623021de16e56a6466b7e835ad0403b9","bugs":{"url":"https://github.com/lmk123/NoSleep.js/issues"},"homepage":"https://github.com/lmk123/NoSleep.js#readme","_id":"nosleep.js@0.5.1","scripts":{},"_shasum":"c1572850236c5968dc8263d07550239de153f12b","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.0","_npmUser":{"name":"milklee","email":"milk.lee@qq.com"},"dist":{"shasum":"c1572850236c5968dc8263d07550239de153f12b","size":7576,"noattachment":false,"key":"/nosleep.js/-/nosleep.js-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nosleep.js/download/nosleep.js-0.5.1.tgz"},"maintainers":[{"name":"npm:richt","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nosleep.js-0.5.1.tgz_1460373612722_0.3850401972886175"},"directories":{},"publish_time":1460373613146,"_hasShrinkwrap":false,"_cnpm_publish_time":1460373613146,"_cnpmcore_publish_time":"2021-12-16T13:22:42.781Z"}},"readme":"# NoSleep.js\n\nPrevent display sleep and enable wake lock in all Android and iOS web browsers.\n\nCheck out the [live demo](https://richtr.github.io/NoSleep.js/example) in any Android or iOS web browser.\n\n## Installation\n\nThis library is available on [Bower](http://bower.io/) as **nosleep**.\n\n`bower install nosleep`\n\nThis package is published to npm as **nosleep.js** and can be installed with:\n\n`npm install nosleep.js`\n\nAlternatively, you can manually add [NoSleep.js](https://github.com/richtr/NoSleep.js/blob/master/dist/NoSleep.js) to your project (or the [minified version](https://github.com/richtr/NoSleep.js/blob/master/dist/NoSleep.min.js)).\n\n## Build from source\n\nInstall all development dependencies with:\n\n`npm install`\n\nTo build this library run:\n\n`npm run build`\n\nA new build of [NoSleep.js](https://github.com/richtr/NoSleep.js/blob/master/dist/NoSleep.js) and [NoSleep.min.js](https://github.com/richtr/NoSleep.js/blob/master/dist/NoSleep.min.js) will now be available in the `/dist` directory.\n\n## Usage\nImport ES6 module:\n\n```javascript\nimport NoSleep from 'nosleep.js';\n```\n\nCreate a new NoSleep object and then enable or disable it when needed.\n\nTo create a new NoSleep object:\n\n```javascript\nvar noSleep = new NoSleep();\n```\n\nTo enable wake lock:\n\n**NOTE: This function call must be wrapped in a user input event handler e.g. a mouse or touch handler**\n\n```javascript\n// Enable wake lock.\n// (must be wrapped in a user input event handler e.g. a mouse or touch handler)\ndocument.addEventListener('click', function enableNoSleep() {\n  document.removeEventListener('click', enableNoSleep, false);\n  noSleep.enable();\n}, false);\n```\n\nTo disable wake lock:\n\n```javascript\n// Disable wake lock at some point in the future.\n// (does not need to be wrapped in any user input event handler)\nnoSleep.disable();\n```\n\nSee [example/index.html](https://github.com/richtr/NoSleep.js/blob/master/example/index.html) (and the [live demo](https://richtr.github.io/NoSleep.js/example)) for more information.\n\n## Feedback\n\nIf you find any bugs or issues please report them on the [NoSleep.js Issue Tracker](https://github.com/richtr/NoSleep.js/issues).\n\nIf you would like to contribute to this project please consider [forking this repo](https://github.com/richtr/NoSleep.js/fork), making your changes and then creating a new [Pull Request](https://github.com/richtr/NoSleep.js/pulls) back to the main code repository.\n\n## License\n\nMIT. Copyright (c) [Rich Tibbett](https://twitter.com/_richtr).\n\nSee the [LICENSE](https://github.com/richtr/NoSleep.js/blob/master/LICENSE) file.\n","_attachments":{},"homepage":"https://github.com/richtr/NoSleep.js","bugs":{"url":"https://github.com/richtr/NoSleep.js/issues"},"license":"MIT"}