Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-crypto-env

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-crypto-env - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

14

dist/index.d.ts

@@ -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

12

package.json
{
"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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc