jose-node-esm-runtime
Advanced tools
Comparing version 3.12.1 to 3.12.2
import { KeyObject } from 'crypto'; | ||
export default function isKeyObject(obj) { | ||
return obj != null && obj instanceof KeyObject; | ||
import * as util from 'util'; | ||
let impl; | ||
if (util.types.isKeyObject) { | ||
impl = function isKeyObject(obj) { | ||
return util.types.isKeyObject(obj); | ||
}; | ||
} | ||
else { | ||
impl = function isKeyObject(obj) { | ||
return obj != null && obj instanceof KeyObject; | ||
}; | ||
} | ||
export default impl; |
import * as crypto from 'crypto'; | ||
import * as util from 'util'; | ||
const webcrypto = crypto.webcrypto; | ||
export default webcrypto; | ||
export function isCryptoKey(key) { | ||
if (webcrypto !== undefined) { | ||
return key != null && key instanceof webcrypto.CryptoKey; | ||
} | ||
return false; | ||
let impl; | ||
if (util.types.isCryptoKey) { | ||
impl = function isCryptoKey(obj) { | ||
return util.types.isCryptoKey(obj); | ||
}; | ||
} | ||
else if (webcrypto) { | ||
impl = function isCryptoKey(obj) { | ||
return obj != null && obj instanceof webcrypto.CryptoKey; | ||
}; | ||
} | ||
else { | ||
impl = (obj) => false; | ||
} | ||
export { impl as isCryptoKey }; | ||
function getHashLength(hash) { | ||
@@ -11,0 +21,0 @@ return parseInt(hash === null || hash === void 0 ? void 0 : hash.name.substr(4), 10); |
{ | ||
"name": "jose-node-esm-runtime", | ||
"version": "3.12.1", | ||
"version": "3.12.2", | ||
"description": "(Node.JS ESM Runtime) 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
145606
3727