Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of functions #8

Open
clintonyeb opened this issue Jun 19, 2017 · 1 comment
Open

Description of functions #8

clintonyeb opened this issue Jun 19, 2017 · 1 comment

Comments

@clintonyeb
Copy link

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))
}
@busypeoples
Copy link
Owner

busypeoples commented Jun 19, 2017

Will also add a couple of examples to the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants