Socket
Socket
Sign inDemoInstall

wait-for-localhost

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-for-localhost - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

51

index.d.ts

@@ -1,18 +0,41 @@

export interface Options {
declare namespace waitForLocalhost {
export interface Options {
/**
@default 80
*/
port?: number;
/**
Use the `GET` HTTP-method instead of `HEAD` to check if the server is running.
@default false
*/
useGet?: boolean;
}
}
declare const waitForLocalhost: {
/**
* @default 80
*/
port?: number;
Wait for localhost to be ready.
/**
* Use the `GET` HTTP-method instead of `HEAD` to check if the server is running.
*
* @default false
@example
```
import waitForLocalhost = require('wait-for-localhost');
(async () => {
await waitForLocalhost({port: 8080});
console.log('Server is ready');
})();
```
*/
useGet?: boolean;
}
(options?: waitForLocalhost.Options): Promise<void>;
/**
* Wait for localhost to be ready.
*/
export default function waitForLocalhost(options?: Options): Promise<void>;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function waitForLocalhost(
// options?: waitForLocalhost.Options
// ): Promise<void>;
// export = waitForLocalhost;
default: typeof waitForLocalhost;
};
export = waitForLocalhost;

@@ -30,2 +30,3 @@ 'use strict';

module.exports = waitForLocalhost;
// TODO: Remove this for the next major release
module.exports.default = waitForLocalhost;
{
"name": "wait-for-localhost",
"version": "3.1.0",
"version": "3.2.0",
"description": "Wait for localhost to be ready",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -33,8 +33,8 @@ "files": [

"devDependencies": {
"ava": "^1.2.1",
"create-test-server": "^2.1.1",
"ava": "^1.4.1",
"create-test-server": "^2.4.0",
"delay": "^4.1.0",
"tsd-check": "^0.3.0",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}
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