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

set-immediate-shim

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

set-immediate-shim - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

9

index.js

@@ -1,5 +0,6 @@

'use strict';
module.exports = typeof setImmediate === 'function' ? setImmediate : (...args) => {
args.splice(1, 0, 0);
setTimeout(...args);
const setImmediate = typeof globalThis.setImmediate === 'function' ? globalThis.setImmediate : (...arguments_) => {
arguments_.splice(1, 0, 0);
setTimeout(...arguments_);
};
export default setImmediate;
{
"name": "set-immediate-shim",
"version": "2.0.0",
"version": "3.0.0",
"description": "Simple setImmediate shim",
"license": "MIT",
"repository": "sindresorhus/set-immediate-shim",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": ">=6"
"node": ">=18"
},

@@ -31,6 +38,5 @@ "scripts": {

"devDependencies": {
"ava": "*",
"import-fresh": "^2.0.0",
"xo": "*"
"ava": "^6.1.2",
"xo": "^0.58.0"
}
}

@@ -1,17 +0,17 @@

# set-immediate-shim [![Build Status](https://travis-ci.org/sindresorhus/set-immediate-shim.svg?branch=master)](https://travis-ci.org/sindresorhus/set-immediate-shim)
# set-immediate-shim
> Simple [`setImmediate`](https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate) [ponyfill](https://ponyfill.com)
Note: This shim is [quite inefficient](https://github.com/sindresorhus/set-immediate-shim/issues/4).
## Install
```sh
npm install set-immediate-shim
```
$ npm install set-immediate-shim
```
## Usage
```js
const setImmediateShim = require('set-immediate-shim');
import setImmediateShim from 'set-immediate-shim';

@@ -28,10 +28,4 @@ setImmediateShim(() => {

## Related
- [p-immediate](https://github.com/sindresorhus/p-immediate) - Returns a promise resolved in the next event loop - think `setImmediate()`
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

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