hapijs / hoek

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

Incorrect default documented for `mergeArrays` option #395

Closed colinrotherham closed 1 month ago

colinrotherham commented 1 month ago

Module version

11.0.4

What documentation problem did you notice?

The type declarations for merge() have mergeArrays: false incorrectly set by default:

https://github.com/hapijs/hoek/blob/7309947c64ae444854a35a5202809f265437a708/lib/index.d.ts#L116-L121

But the source code (and documentation) shows mergeArrays: true as the default:

https://github.com/hapijs/hoek/blob/7309947c64ae444854a35a5202809f265437a708/lib/merge.js#L20

This caught me out recently, I'll open a PR if that's alright

kanongil commented 1 month ago

Thanks for the report! A PR would be welcome.

colinrotherham commented 1 month ago

No problem @kanongil, fixed in https://github.com/hapijs/hoek/pull/396