Read my introductory blogpost
Pragmatic curried functions
Function.prototype.bind, one quickly drowns in a sea of parentheses as one translates calling a function of 3 arguments to
funkierJS provides pragmatic curried functions: yes, you can call funkierJS's pragmatic curried functions one argument at a time, but if you have more arguments available, then you can supply them all at once. Your three argument function can now be called using any of
f(1)(2)(3), f(1, 2)(3), f(1)(2, 3) as well as plain old
f(1, 2, 3).
funkierJS will keep you in the world of curried functions as much as possible. As well as supplying the means for you to curry your own functions, funkierJS always returns curried functions from its methods.
this will be null inside such functions. Curry them with bind when you want to fix the value of
this, regardless of what later partial applications try to do. Finally, curry methods on an object prototype with objectCurry, and you can enjoy all the benefits of partial application with your object methods, with functions that permanently bind the value of
this on each first partial application. (In some circumstances,
objectCurry can curry constructors too!)
Everything you need to be productive
parseInt? With funkierJS's reimplementations, such problems melt away. funkierJS takes a pragmatic approach to type-checking, not getting in your way unnecessarily, whilst alerting you when you were unlikely to be wanting a coercion. Finally, funkierJS's reimplementations enable common functional idioms, for example, allowing you to easily map, filter and reduce over both arrays and strings with its API functions.
funkierJS aims to make your life easier. To that end, it minimises your need to context-switch, and provides a
help function, which accepts any of its API functions, and provides a quick summary of usage, right there in your REPL or web console. You can quickly find the information you need, and then get back to more interesting problems!
An open-source library
funkierJS is open-source, and available on Github. You're welcome to contribute and drive funkierJS forward!