get-port-please
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [2.1.0](https://github.com/nuxt-contrib/get-port-please/compare/v2.0.0...v2.1.0) (2020-12-04) | ||
### Features | ||
* allow config to be string or number ([13f4275](https://github.com/nuxt-contrib/get-port-please/commit/13f4275e021fe1cd69c3ac775c284d92cd6c601d)) | ||
## [2.0.0](https://github.com/nuxt-contrib/get-port-please/compare/v1.1.0...v2.0.0) (2020-12-04) | ||
@@ -7,0 +14,0 @@ |
@@ -9,4 +9,5 @@ interface GetPortOptions { | ||
} | ||
declare function getPort(config?: Partial<GetPortOptions>): Promise<number>; | ||
declare type GetPortInput = Partial<GetPortOptions> | number | string; | ||
declare function getPort(config?: GetPortInput): Promise<number>; | ||
export { GetPortOptions, getPort }; | ||
export { GetPortInput, GetPortOptions, getPort }; |
@@ -16,2 +16,5 @@ 'use strict'; | ||
async function getPort(config) { | ||
if (typeof config === "number" || typeof config === "string") { | ||
config = {port: parseInt(config + "")}; | ||
} | ||
const options = {...defaults, ...config}; | ||
@@ -18,0 +21,0 @@ const portsToCheck = []; |
{ | ||
"name": "get-port-please", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Get an available TCP port to listen", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/get-port-please", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7260
71