fix(core): update

This commit is contained in:
2021-06-30 00:30:11 +02:00
parent 3077a319cb
commit 9bd675692d
2 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,10 @@
import * as plugins from './smartarray.plugins';
export let standardExport = 'Hi there! :) This is an exported string';
export const filter = async<T>(arrayArg: T[], filterFunction: (itemArg: T) => Promise<boolean>): Promise<T[]> => {
const returnArray: T[] = [];
for (const itemArg of arrayArg) {
const filterResult = await filterFunction(itemArg);
if (filterResult) {
returnArray.push(itemArg);
}
}
return returnArray;
}