Skip to content

Commit

Permalink
Make defaultValue for get optional
Browse files Browse the repository at this point in the history
This defaults to undefined
  • Loading branch information
bertyhell committed Apr 11, 2020
1 parent bdd443e commit d905555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2135,7 +2135,7 @@ Gets the value at path of object.
// output: 3

// Native
const get = (obj, path, defaultValue) => {
const get = (obj, path, defaultValue = undefined) => {
const travel = regexp =>
String.prototype.split
.call(path, regexp)
Expand Down

0 comments on commit d905555

Please sign in to comment.