MCPcopy
hub / github.com/mailvelope/mailvelope / getAllKeyringAttr

Function getAllKeyringAttr

src/modules/keyring.js:305–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303 * @return {Object<keyringId, KeyringBase>}
304 */
305export async function getAllKeyringAttr() {
306 await keyringInitialized;
307 const attrObj = keyringAttr.toObject();
308 if (keyringAttr.has(GNUPG_KEYRING_ID)) {
309 const gpgKeyring = keyringMap.get(GNUPG_KEYRING_ID);
310 if (gpgKeyring) {
311 Object.assign(attrObj[GNUPG_KEYRING_ID], gpgKeyring.getAttr());
312 } else {
313 delete attrObj[GNUPG_KEYRING_ID];
314 }
315 }
316 return attrObj;
317}
318
319/**
320 * Set keyring attributes

Callers 1

keyring-test.jsFile · 0.90

Calls 4

getAttrMethod · 0.80
toObjectMethod · 0.45
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected