internal-ip
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -1,2 +0,2 @@ | ||
declare namespace internalIp { | ||
interface v6 { | ||
/** | ||
@@ -10,16 +10,17 @@ * @returns The IPv6 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned. | ||
*/ | ||
export function v6(): Promise<string>; | ||
export namespace v6 { | ||
/** | ||
* @returns The IPv6 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned. | ||
* | ||
* @example | ||
* | ||
* console.log(internalIp.v6.sync()); | ||
* //=> 'fe80::1' | ||
*/ | ||
function sync(): string; | ||
} | ||
(): Promise<string>; | ||
/** | ||
* @returns The IPv6 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned. | ||
* | ||
* @example | ||
* | ||
* console.log(internalIp.v6.sync()); | ||
* //=> 'fe80::1' | ||
*/ | ||
sync(): string; | ||
} | ||
interface v4 { | ||
/** | ||
* @returns The IPv4 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned. | ||
@@ -32,16 +33,23 @@ * | ||
*/ | ||
export function v4(): Promise<string>; | ||
export namespace v4 { | ||
/** | ||
* @returns The IPv4 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned. | ||
* | ||
* @example | ||
* | ||
* console.log(internalIp.v4.sync()) | ||
* //=> '10.0.0.79' | ||
*/ | ||
function sync(): string; | ||
} | ||
(): Promise<string>; | ||
/** | ||
* @returns The IPv4 address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `null` will be returned. | ||
* | ||
* @example | ||
* | ||
* console.log(internalIp.v4.sync()) | ||
* //=> '10.0.0.79' | ||
*/ | ||
sync(): string; | ||
} | ||
export default internalIp; | ||
declare const internalIp: { | ||
v6: v6; | ||
v4: v4; | ||
// TODO: Remove this for the next major release | ||
default: typeof internalIp; | ||
}; | ||
export = internalIp; |
@@ -50,2 +50,3 @@ 'use strict'; | ||
module.exports = internalIp; | ||
// TODO: Remove this for the next major release | ||
module.exports.default = internalIp; |
{ | ||
"name": "internal-ip", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Get your internal IP address", | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "xo && ava && tsd-check" | ||
"test": "xo && ava && tsd" | ||
}, | ||
@@ -36,10 +36,10 @@ "files": [ | ||
"dependencies": { | ||
"default-gateway": "^4.0.1", | ||
"default-gateway": "^4.2.0", | ||
"ipaddr.js": "^1.9.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.2.1", | ||
"tsd-check": "^0.3.0", | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
} | ||
} |
5726
89
Updateddefault-gateway@^4.2.0