Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

request-idle-callback

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-idle-callback - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

package.json

@@ -29,3 +29,8 @@ {

},
"version": "1.0.0"
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"version": "1.0.1"
}

41

README.md

@@ -1,35 +0,34 @@

# Ttítulo
<!-- Breve descripción -->
# Request Idle Callback Shim
## Instalación
<!-- Por ejemplo npm install titulo -->
For more information refer to [Using requestIdleCallback](https://developers.google.com/web/updates/2015/08/using-requestidlecallback)
## Ejemplo
<!-- Un caso breve y práctico de uso en código -->
## Install
`npm install request-idle-callback`
## Example
``` js
<!-- Código de ejemplo -->
var requestIdleCallback = require('request-idle-callback')
// Executes myNonEssentialWork duting idle time on each frame or fallbacks to using setTimeout to run at most 50ms per frame
requestIdleCallback(myNonEssentialWork);
function myNonEssentialWork (deadline) {
while (deadline.timeRemaining() > 0)
doWorkIfNeeded();
}
```
## API
<!-- Detalle de cada uno de los métodos con parámetros -->
### titulo.metodo(parámetro[, parámetro_opcional][, callback])
### requestIdleCallback(callback(deadline))
Breve descripción
`deadline` is an object containing:
``` js
<!-- Código de ejemplo -->
```
* `deadline.didTimeout` boolean indicating if it is still time to deadline.
* `deadline.timeRemaining` function that returns remaining time.
## Tests
<!-- Breve descripción de cómo correr la suit de tests -->
`node tests.js`
## Contribuyendo
<!-- Referencia a CONTRIBUTING.md -->
## Código de conducta
<!-- Referencia a CODE_OF_CONDUCT.md -->
## Licencia
<!-- Referencia a LICENSE.md -->
MIT

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc