fix(core): update
This commit is contained in:
parent
d608aa81a8
commit
cbfe7927e7
@ -119,6 +119,6 @@ jobs:
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
pnpm install -g @gitzone/tsdoc
|
||||
pnpm install -g @git.zone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
||||
|
@ -121,7 +121,7 @@ pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci command npm install -g @git.zone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
|
@ -13,10 +13,10 @@
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
"@gitzone/tsbundle": "^2.0.8",
|
||||
"@gitzone/tsrun": "^1.2.44",
|
||||
"@gitzone/tstest": "^1.0.77",
|
||||
"@git.zone/tsbuild": "^2.1.66",
|
||||
"@git.zone/tsbundle": "^2.0.8",
|
||||
"@git.zone/tsrun": "^1.2.44",
|
||||
"@git.zone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.12",
|
||||
"@types/node": "^20.4.6"
|
||||
},
|
||||
|
2652
pnpm-lock.yaml
generated
2652
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartarray',
|
||||
version: '1.0.5',
|
||||
version: '1.0.6',
|
||||
description: 'a package exposing async manipulation for arrays'
|
||||
}
|
||||
|
14
ts/index.ts
14
ts/index.ts
@ -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>(
|
||||
arrayArg: T[],
|
||||
filterFunction: (itemArg: T) => Promise<boolean>
|
||||
|
Loading…
Reference in New Issue
Block a user