
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
wakelock-lazy-polyfill
Advanced tools
npm i wakelock-lazy-polyfill
Polyfills WakeLock if not present by lazy-loading nosleep.js (but only when actually requested).
That means if it's natively supported this lib only adds ~800 bytes to your project.
Can also drop it in via CDN:
<script src="http://unpkg.com/wakelock-lazy-polyfill"></script>
https://wakelock-polyfill.joreteg.com/
The Web is getting a wonderful WakeLock API to keep your screen awake, but it's not broadly available yet. As of this writing it's a Origin Trial in Chrome that should ship in the next version.
Regardless, there's been a clever hack, called nosleep.js that plays a hidden video in the background to trick the browser into staying awake. This works pretty well, but...
So, here we are.
Obviously props to @richtr for nosleep.js and Thomas Steiner for his work on making the WakeLock API "A Thing".
If you like this, follow @HenrikJoreteg on twitter.
FAQs
Lazy polyfill for wakelock API.
The npm package wakelock-lazy-polyfill receives a total of 437 weekly downloads. As such, wakelock-lazy-polyfill popularity was classified as not popular.
We found that wakelock-lazy-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.