hapijs / hoek

Node utilities shared among the extended hapi universe
Other
480 stars 171 forks source link

applytodefaults docs update #310

Closed robmcguinness closed 5 years ago

robmcguinness commented 5 years ago

https://github.com/hapijs/hoek/blob/master/API.md#applytodefaultsdefaults-source-options

I believe n the section labeled:

Apply source with a null value to a copy of the defaults

this:

const config = Hoek.applyToDefaults(defaults, source, true); // results in { host: null, port: 8080 }

should be:

const config = Hoek.applyToDefaults(defaults, source, {nullOverride: true}); // results in { host: null, port: 8080 }

I'll submit a small PR in a bit.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.