https://github.com/morulus/propsflow
Object enhancers flow
https://github.com/morulus/propsflow
Last synced: about 1 year ago
JSON representation
Object enhancers flow
- Host: GitHub
- URL: https://github.com/morulus/propsflow
- Owner: morulus
- License: mit
- Created: 2018-01-16T11:50:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T21:03:24.000Z (over 7 years ago)
- Last Synced: 2025-06-04T02:26:02.530Z (about 1 year ago)
- Language: JavaScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
propsflow
==
Create sequence of plain object's enhancers, powered with [extraflow](https://github.com/morulus/extraflow).
Modifications:
- **Auto spread** objects;
- **Type restricted**.
```js
const enhancer = propsflow(
() => ({ A, B, C }) => ({
D: A + B + C,
}),
({ A }) => ({
B: A * 2,
}),
({ B }) => ({
C: B * 2
}),
)
enhancer({
A: 2
});
/*
{
A: 2,
B: 4,
C: 8,
D: 14
}
*/
```
License
--
MIT, 2018, Vladimir Morulus