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

add a default value to all params #91

Closed
2 tasks
emilos opened this issue Nov 13, 2019 · 0 comments
Closed
2 tasks

add a default value to all params #91

emilos opened this issue Nov 13, 2019 · 0 comments

Comments

@emilos
Copy link
Contributor

emilos commented Nov 13, 2019

We're breaking the pure rule in many cases, e.g. in the simple method:

function first (array) {
  return array[0]
}

the following code would throw when there's no array, or something else was passed.

Acceptance criteria

  • add default values to functions in array.js, collection.js etc.
  • add tests against the undefined case (which is probably the most common one)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant