fix(core): update

This commit is contained in:
Philipp Kunz 2024-04-26 14:05:48 +02:00
parent d608aa81a8
commit cbfe7927e7
6 changed files with 1255 additions and 1425 deletions

View File

@ -119,6 +119,6 @@ jobs:
run: | run: |
npmci node install stable npmci node install stable
npmci npm install npmci npm install
pnpm install -g @gitzone/tsdoc pnpm install -g @git.zone/tsdoc
npmci command tsdoc npmci command tsdoc
continue-on-error: true continue-on-error: true

View File

@ -121,7 +121,7 @@ pages:
stage: metadata stage: metadata
script: script:
- npmci node install lts - npmci node install lts
- npmci command npm install -g @gitzone/tsdoc - npmci command npm install -g @git.zone/tsdoc
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command tsdoc

View File

@ -13,10 +13,10 @@
"buildDocs": "tsdoc" "buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.66", "@git.zone/tsbuild": "^2.1.66",
"@gitzone/tsbundle": "^2.0.8", "@git.zone/tsbundle": "^2.0.8",
"@gitzone/tsrun": "^1.2.44", "@git.zone/tsrun": "^1.2.44",
"@gitzone/tstest": "^1.0.77", "@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.12", "@push.rocks/tapbundle": "^5.0.12",
"@types/node": "^20.4.6" "@types/node": "^20.4.6"
}, },

2652
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartarray', name: '@push.rocks/smartarray',
version: '1.0.5', version: '1.0.6',
description: 'a package exposing async manipulation for arrays' description: 'a package exposing async manipulation for arrays'
} }

View File

@ -1,3 +1,17 @@
export const map = async <T = any, R = any>(
arrayArg: T[],
mapFunction: (itemArg: T) => Promise<R>
): Promise<R[]> => {
const returnArray: R[] = [];
for (const itemArg of arrayArg) {
const mapResult = await mapFunction(itemArg);
if (mapResult !== undefined) {
returnArray.push(mapResult);
}
}
return returnArray;
};
export const filter = async <T>( export const filter = async <T>(
arrayArg: T[], arrayArg: T[],
filterFunction: (itemArg: T) => Promise<boolean> filterFunction: (itemArg: T) => Promise<boolean>