- Notifications
You must be signed in to change notification settings - Fork0
🍛 Bind (curry) with options object
License
NotificationsYou must be signed in to change notification settings
Hermanya/partial-application-with-named-parameters
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Partial Application with Named Parameters
First have a function, that destructs its first and only parameter.This module will make you able to partially apply named parameters for that function.Take a look at tests to for details.
importtestfrom'ava';importbindablefrom'./';test('calculate sum',t=>{constreduce=bindable(function({reducer, initialValue, array}){returnarray.reduce(reducer,initialValue);});constreduceFromZero=reduce({initialValue:0});constarray=[1,2,3];t.is(reduceFromZero({reducer:(x,y)=>x+y,array}),6);});
MIT ©Herman Starikov
About
🍛 Bind (curry) with options object
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
