spected
spected copied to clipboard
Description of functions
Please add descriptions to functions in the source code, to make it easy to read and understand.
Example:
/**
* Transforms an input element....
* @param {Function} successFn callback function in case of valid input
* @param {Function} failFn callback function in case of invalid input
* @param {Array} input
* @returns {*}
*/
const transform = (successFn: Function, failFn: Function, input: Array<any>): any => {
const valid = all(equals(true), input)
return valid ? successFn() : failFn(filter(a => a !== true, input))
}
Will also add a couple of examples to the docs.