Home GnuPG
Diffusion GPGME 766d42c248a8

js: typecheck destructured parameters

Description

js: typecheck destructured parameters

  • destructuring just takes the input argument and treats it as object. In cases like in src/Keyring/generateKey, where I forgot to change the old syntax, the fingerprint as string was destructured into an object without "pattern", which caused all Keys to be retrieved. So, methods with a destructuring now check if the first argument is an object and get a default empty object if no parameter is submitted. This allows the further use of destructured parameters, while still ensuring nothing vastly incorrect is used.
  • src/Kering.js, unittsets.js: fixed old syntax in method usage

Details

Provenance
mkrambachAuthored on Aug 27 2018, 12:32 PM
Parents
rM53c5b9a265d3: json: Do not put FILE_NAME into the verify result.
Branches
Unknown
Tags
Unknown