js-crypto-env
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -29,2 +29,10 @@ /** | ||
declare const getMsCrypto: () => any; | ||
/** | ||
* Get native crypto lib name. | ||
* @return {name: 'msCrypto'|'webCrypto'|'nodeCrypto'|undefined, crypto?: any} | ||
*/ | ||
declare const getCrypto: () => { | ||
name: "msCrypto" | "webCrypto" | "nodeCrypto" | undefined; | ||
crypto?: any; | ||
}; | ||
declare const _default: { | ||
@@ -36,4 +44,8 @@ getNodeCrypto: () => any; | ||
getRootWebCryptoAll: () => any; | ||
getCrypto: () => { | ||
name: "msCrypto" | "webCrypto" | "nodeCrypto" | undefined; | ||
crypto?: any; | ||
}; | ||
}; | ||
export default _default; | ||
export { getNodeCrypto, getWebCrypto, getMsCrypto, getWebCryptoAll, getRootWebCryptoAll }; | ||
export { getNodeCrypto, getWebCrypto, getMsCrypto, getWebCryptoAll, getRootWebCryptoAll, getCrypto }; |
@@ -68,3 +68,21 @@ "use strict"; | ||
exports.getMsCrypto = getMsCrypto; | ||
exports.default = { getNodeCrypto: getNodeCrypto, getWebCrypto: getWebCrypto, getMsCrypto: getMsCrypto, getWebCryptoAll: getWebCryptoAll, getRootWebCryptoAll: getRootWebCryptoAll }; | ||
/** | ||
* Get native crypto lib name. | ||
* @return {name: 'msCrypto'|'webCrypto'|'nodeCrypto'|undefined, crypto?: any} | ||
*/ | ||
var getCrypto = function () { | ||
var webCrypto = getWebCrypto(); | ||
var nodeCrypto = getNodeCrypto(); | ||
var msCrypto = getMsCrypto(); | ||
if (typeof nodeCrypto !== 'undefined') | ||
return { name: 'nodeCrypto', crypto: nodeCrypto }; | ||
else if (typeof webCrypto !== 'undefined' && typeof msCrypto === 'undefined') | ||
return { name: 'webCrypto', crypto: webCrypto }; | ||
else if (typeof msCrypto !== 'undefined') | ||
return { name: 'msCrypto', crypto: msCrypto }; | ||
else | ||
return { name: undefined }; | ||
}; | ||
exports.getCrypto = getCrypto; | ||
exports.default = { getNodeCrypto: getNodeCrypto, getWebCrypto: getWebCrypto, getMsCrypto: getMsCrypto, getWebCryptoAll: getWebCryptoAll, getRootWebCryptoAll: getRootWebCryptoAll, getCrypto: getCrypto }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "js-crypto-env", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Shared environment modules for jscu", | ||
@@ -31,12 +31,12 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/chai": "4.2.5", | ||
"@types/chai": "4.2.6", | ||
"@types/mocha": "5.2.7", | ||
"@types/node": "10.17.5", | ||
"@types/node": "10.17.6", | ||
"istanbul-instrumenter-loader": "3.0.1", | ||
"karma-coverage-istanbul-reporter": "2.1.0", | ||
"karma-coverage-istanbul-reporter": "2.1.1", | ||
"ts-loader": "6.2.1", | ||
"ts-node": "8.5.2", | ||
"ts-node": "8.5.4", | ||
"tsc": "1.20150623.0", | ||
"typescript": "3.7.2" | ||
"typescript": "3.7.3" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12555
210
0