MCPcopy
hub / github.com/mailvelope/mailvelope / filterAsync

Function filterAsync

src/lib/util.js:49–53  ·  view source on GitHub ↗
(array, asyncFilterFn)

Source from the content-addressed store, hash-verified

47}
48
49export async function filterAsync(array, asyncFilterFn) {
50 const promises = array.map(async item => await asyncFilterFn(item) && item);
51 const result = await Promise.all(promises);
52 return result.filter(item => item);
53}
54
55export async function someAsync(array, asyncSomeFn) {
56 const promises = array.map(asyncSomeFn);

Callers 5

sanitizeKeyringFunction · 0.90
getKeyDataFunction · 0.90
getValidSigningKeysMethod · 0.90
getKeyByAddressMethod · 0.90
readArmoredKeysMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected