https://github.com/samrocksc/bentinabeakley
Curry your functions with Bentina Beakley!
https://github.com/samrocksc/bentinabeakley
Last synced: 6 months ago
JSON representation
Curry your functions with Bentina Beakley!
- Host: GitHub
- URL: https://github.com/samrocksc/bentinabeakley
- Owner: samrocksc
- License: mit
- Created: 2020-04-11T07:14:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T12:09:18.000Z (over 4 years ago)
- Last Synced: 2025-04-04T08:43:47.630Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 139 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bentina Beakley!
I basically curry functions in a super opinionated way. I originally made this inside of [boulangerie](https://github.com/samrocksc/boulangerie), but found i was using this function more than that module....so, i made it.
You can pass in sync, or async functions.
```javascript
const currier = require('bentinabeakley');
const buildAdapterFunc = (build, service, output) => {
const totalArray = [...build, ...service, ...output];
return async initialParam => currier(initialParam).chain(totalArray).execute();
};
await buildAdapterFunc(
[
async () => {
console.log('a build step');
},
],
[
() => {
console.log('a service step');
},
],
[
() => {
console.log('an output step');
},
() => true,
]
); // returns true
```