/opt/canhelp/node_modules/jose/dist/webapi/lib
NameSizeModeActions
aesgcmkw.js6000644editdlrm
aeskw.js11890644editdlrm
asn1.js87170644editdlrm
base64.js6730644editdlrm
buffer_utils.js13450644editdlrm
check_key_type.js47680644editdlrm
content_encryption.js76360644editdlrm
crypto_key.js45660644editdlrm
deflate.js15250644editdlrm
ecdhes.js20290644editdlrm
helpers.js5960644editdlrm
invalid_key_input.js9740644editdlrm
is_key_like.js4930644editdlrm
jwk_to_key.js40090644editdlrm
jwt_claims_set.js82080644editdlrm
key_management.js80750644editdlrm
key_to_jwk.js9430644editdlrm
normalize_key.js52830644editdlrm
pbes2kw.js16140644editdlrm
rsaes.js9300644editdlrm
signing.js25210644editdlrm
type_checks.js14700644editdlrm
validate_algorithms.js3560644editdlrm
validate_crit.js15830644editdlrm
Edit: /opt/canhelp/node_modules/jose/dist/webapi/lib/invalid_key_input.js (974B)
function message(msg, actual, ...types) { types = types.filter(Boolean); if (types.length > 2) { const last = types.pop(); msg += `one of type ${types.join(', ')}, or ${last}.`; } else if (types.length === 2) { msg += `one of type ${types[0]} or ${types[1]}.`; } else { msg += `of type ${types[0]}.`; } if (actual == null) { msg += ` Received ${actual}`; } else if (typeof actual === 'function' && actual.name) { msg += ` Received function ${actual.name}`; } else if (typeof actual === 'object' && actual != null) { if (actual.constructor?.name) { msg += ` Received an instance of ${actual.constructor.name}`; } } return msg; } export const invalidKeyInput = (actual, ...types) => message('Key must be ', actual, ...types); export const withAlg = (alg, actual, ...types) => message(`Key for the ${alg} algorithm must be `, actual, ...types);