Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
ne mapDecorate method for exstrea extras, imported from a working pro…
Browse files Browse the repository at this point in the history
…ject
  • Loading branch information
ildella committed Jan 16, 2024
1 parent 2800b07 commit d3ec032
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
8 changes: 8 additions & 0 deletions fusto/exstream-extras.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ __.extend('decorate', function (key, value) {
return this.map(item => ({[key]: value, ...item}))
})

__.extend('mapDecorate', function (f, key) {
// eslint-disable-next-line fp/no-this
return this.map(async item => {
const value = await f(item)
return {[key]: value, ...item}
})
})

module.exports = {
__,
xs: __,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moar-js",
"version": "1.14.0",
"version": "1.14.1",
"description": "Simple JavaScript files I use across projects",
"author": {
"name": "Daniele Dellafiore"
Expand Down Expand Up @@ -39,13 +39,13 @@
"test.watch": "yarn test --watch"
},
"devDependencies": {
"axios": "1.6.4",
"axios": "1.6.5",
"eslint": "8.56.0",
"eslint-config-node-moar": "0.12.1",
"eslint-config-node-moar-stricter": "0.2.1",
"eslint-config-node-moar-test": "0.2.0",
"eslint-plugin-fp": "2.3.0",
"eslint-plugin-jest": "27.6.1",
"eslint-plugin-jest": "27.6.3",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-security": "1.7.1",
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1459,14 +1459,14 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:1.6.4":
version: 1.6.4
resolution: "axios@npm:1.6.4"
"axios@npm:1.6.5":
version: 1.6.5
resolution: "axios@npm:1.6.5"
dependencies:
follow-redirects: "npm:^1.15.4"
form-data: "npm:^4.0.0"
proxy-from-env: "npm:^1.1.0"
checksum: ed15229f447dd81a5a9e3dac5c84d64f8598145b1102fb6f8c5feb0d02d0dafaef7bf071d2575a7687dd0c014b9da2edbcff59ee9a57b59da941ae673b938919
checksum: 465489d9bf8f039b9adbc8103b6299d6a5e26de77b27f0e4173d814d39bca8f4b4659d94e09ee40461aedccd8c2452f1e2b3edace1c9f81220060d2974ff9dc7
languageName: node
linkType: hard

Expand Down Expand Up @@ -2209,9 +2209,9 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-jest@npm:27.6.1":
version: 27.6.1
resolution: "eslint-plugin-jest@npm:27.6.1"
"eslint-plugin-jest@npm:27.6.3":
version: 27.6.3
resolution: "eslint-plugin-jest@npm:27.6.3"
dependencies:
"@typescript-eslint/utils": "npm:^5.10.0"
peerDependencies:
Expand All @@ -2223,7 +2223,7 @@ __metadata:
optional: true
jest:
optional: true
checksum: 8cc20a25b6173f4c6ba6151d830fd27458c4946ea9e0d7cd9ed59f6e24c41f526b1f10e03d491bfd8e9d102e6777c5594a43838a9e584eb07594847e2f9416c4
checksum: a29319d5a090633e30658da7521f9fa0468f861403509538e0927175ab2a46a7f60bd7fd344b54f7fb5f8e8b6385d8db67c305502a4de1291f32191163e74725
languageName: node
linkType: hard

Expand Down Expand Up @@ -4194,13 +4194,13 @@ __metadata:
version: 0.0.0-use.local
resolution: "moar-js@workspace:."
dependencies:
axios: "npm:1.6.4"
axios: "npm:1.6.5"
eslint: "npm:8.56.0"
eslint-config-node-moar: "npm:0.12.1"
eslint-config-node-moar-stricter: "npm:0.2.1"
eslint-config-node-moar-test: "npm:0.2.0"
eslint-plugin-fp: "npm:2.3.0"
eslint-plugin-jest: "npm:27.6.1"
eslint-plugin-jest: "npm:27.6.3"
eslint-plugin-node: "npm:11.1.0"
eslint-plugin-promise: "npm:6.1.1"
eslint-plugin-security: "npm:1.7.1"
Expand Down

0 comments on commit d3ec032

Please sign in to comment.