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

sleep-synchronously

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sleep-synchronously - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

6

index.d.ts

@@ -8,3 +8,3 @@ /**

```
import sleepSynchronously = require('sleep-synchronously');
import sleepSynchronously from 'sleep-synchronously';

@@ -20,4 +20,2 @@ console.log(new Date());

*/
declare function sleepSynchronously(milliseconds: number): void;
export = sleepSynchronously;
export default function sleepSynchronously(milliseconds: number): void;

@@ -1,5 +0,3 @@

'use strict';
module.exports = milliseconds => {
export default function sleepSynchronously(milliseconds) {
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds);
};
}
{
"name": "sleep-synchronously",
"version": "1.0.0",
"version": "2.0.0",
"description": "Block the main thread for a given amount of time",

@@ -13,4 +13,6 @@ "license": "MIT",

},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=10"
"node": ">=12"
},

@@ -39,8 +41,8 @@ "scripts": {

"devDependencies": {
"ava": "^2.4.0",
"in-range": "^2.0.0",
"time-span": "^4.0.0",
"tsd": "^0.13.1",
"xo": "^0.33.0"
"ava": "^3.15.0",
"in-range": "^3.0.0",
"time-span": "^5.0.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
}
}

@@ -1,2 +0,2 @@

# sleep-synchronously [![Build Status](https://travis-ci.com/sindresorhus/sleep-synchronously.svg?branch=master)](https://travis-ci.com/github/sindresorhus/sleep-synchronously)
# sleep-synchronously

@@ -9,3 +9,3 @@ > Block the main thread for a given amount of time

This package is better than many other similar packages as it's not a native Node.js addon, but instead uses modern JavaScript features.
This package is better than many other similar packages as it's not a native Node.js addon, but instead uses modern JavaScript features. It does not work in the browser.

@@ -21,3 +21,3 @@ ## Install

```js
const sleepSynchronously = require('sleep-synchronously');
import sleepSynchronously from 'sleep-synchronously';

@@ -24,0 +24,0 @@ console.log(new Date());

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