-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace address { | ||
function ip(interfaceName?: string): string | ||
|
||
function ipv6(interfaceName?: string): string | ||
|
||
function mac(callback: (err: Error, addr: string) => void): void | ||
function mac(interfaceName: string, callback: (err: Error, addr: string) => void): void | ||
|
||
function dns(callback: (err: Error, servers: string[]) => void): void | ||
function dns(filePath: string, callback: (err: Error, servers: string[]) => void): void | ||
} | ||
|
||
function address(callback: (err: Error, addr: { ip: string, ipv6: string, mac: string }) => void): void | ||
function address(interfaceName: string, callback: (err: Error, addr: { ip: string, ipv6: string, mac: string }) => void): void | ||
|
||
export = address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "1.0.3", | ||
"description": "Get current machine IP, MAC and DNS servers.", | ||
"main": "lib/address.js", | ||
"types": "lib/address.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
|
@@ -43,4 +44,4 @@ | |
}, | ||
"author": "fengmk2 <[email protected]>", | ||
"license": "MIT" | ||
} | ||
} |