git ssb

1+

Matt McKegg / mutant



Commit 01e9e1d516a0bcf09d486425ab7cba0f919f5a1a

Merge pull request #17 from dominictarr/patch-4

document mutant/once-idle
Matt McKegg authored on 8/7/2017, 7:23:24 AM
GitHub committed on 8/7/2017, 7:23:24 AM
Parent: 1aafd09e523fdb479815d832932868b6130cc2be
Parent: 149f6bea0b174eebfb9243bd4b94384adb0ac740

Files changed

README.mdchanged
README.mdView
@@ -391,11 +391,19 @@
391391
392392
393393 ### onceIdle
394394
395-...
395 +delay a function until the next [idle callback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback)
396 +without hammering the `requestIdleCallback` api
396397
398 +``` js
399 +var onceIdle = require('mutant/once-idle')
400 +onceIdle(function () {
401 + //called once, at some later point (after rendering and such)
402 +})
403 +```
397404
405 +
398406 ### resolve
399407
400408 ...
401409

Built with git-ssb-web