<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
/** | |
* Takes a function and curries it | |
* @param {function} func input non-curried function | |
* @param {number} [amountArgs=func.length] number of arguments to collect; defaults to func.length | |
* @example | |
* let plus = (a, b) => a+b; | |
* let curriedPlus = curry(plus); | |
* curriedPlus(1)(2) | |
* // => 3 | |
* @returns a collect function for collecting the arguments and calling the input function |
/** | |
* JS promisified setTimeout | |
* | |
* @param {number} ms timeout time in ms | |
* @example | |
* wait(2000).then(console.log) | |
* // => logs after 2 seconds | |
* @returns {Promise} A promise that resolves after the specified time `ms` | |
*/ | |
let wait = ms => new Promise(res => setTimeout(res, ms)); |
/** | |
* JS Curried Pipe Function | |
* | |
* @param {array} arr input function chain | |
* @example | |
* let calculateCost = pipe([ | |
* products => products.reduce(plus), // Total Price | |
* price => price * 1.2, // Tax | |
* price => price - 50 // Discount | |
* ]); |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.