@waiting/shared-core
Advanced tools
Comparing version 13.1.0 to 13.2.0
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 13.0.0 | ||
* @version 13.1.0 | ||
* @author waiting | ||
@@ -378,2 +378,22 @@ * @license MIT | ||
/** | ||
* 获取网络信息,不包括回环地址信息 | ||
*/ | ||
function retrieveExternalNetWorkInfo() { | ||
return Object.entries(os.networkInterfaces()).reduce((acc, curr) => { | ||
const [, nets] = curr; | ||
/* istanbul ignore if */ | ||
if (!nets) { | ||
return acc; | ||
} | ||
nets.forEach((net) => { | ||
// Skip over internal (i.e. 127.0.0.1) addresses | ||
if (!net.internal) { | ||
acc.push(net); | ||
} | ||
}); | ||
return acc; | ||
}, []); | ||
} | ||
/** | ||
* Convert 'tb_user-detail' to tbUserDetail | ||
@@ -556,2 +576,3 @@ * @see SnakeToCamel of @waiting/shared-types | ||
exports.readFileLineRx = readFileLineRx; | ||
exports.retrieveExternalNetWorkInfo = retrieveExternalNetWorkInfo; | ||
exports.retrieveProcInfo = retrieveProcInfo; | ||
@@ -558,0 +579,0 @@ exports.rimraf = rimraf; |
@@ -7,3 +7,4 @@ export * from './asset'; | ||
export * from './helper'; | ||
export * from './net'; | ||
export * from './string'; | ||
export * from './stats'; |
@@ -7,3 +7,4 @@ export * from './asset'; | ||
export * from './helper'; | ||
export * from './net'; | ||
export * from './string'; | ||
export * from './stats'; |
{ | ||
"name": "@waiting/shared-core", | ||
"author": "waiting", | ||
"version": "13.1.0", | ||
"version": "13.2.0", | ||
"description": "node core function re export with Promise or Observable", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@waiting/shared-types": "^13.1.0", | ||
"@waiting/shared-types": "^13.2.0", | ||
"rxjs": "7" | ||
@@ -95,3 +95,3 @@ }, | ||
}, | ||
"gitHead": "cf66a07b62298feed11d97360450c913837351e5" | ||
"gitHead": "f5cdcfa5a7896d9d1a0eace17f34171b614db391" | ||
} |
@@ -8,4 +8,5 @@ | ||
export * from './helper' | ||
export * from './net' | ||
export * from './string' | ||
export * from './stats' | ||
Sorry, the diff of this file is not supported yet
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
78160
40
2087