cipami / nuxt-lodash

Lodash module for Nuxt
MIT License
104 stars 11 forks source link

`prefixSkip` option injects 'is' by default #35

Closed localusercamp closed 1 year ago

localusercamp commented 1 year ago

Hi.

I think module should not provide array defaults, because it leads to cases where you cannot disable it completely. For now for example i cannot alias check-functions (isFinite, isBuffer e.t.c) as _isFinite even if i set prefixSkip: [].

localusercamp commented 1 year ago

Because of reasons of backwards compatibility prefixSkip option may receive false as acceptable value for completely disabling that option. But in general i think it is incorrect approach to set defaults in array type options.

What do you think?

cipami commented 1 year ago

I agree, for now I fixed logic so that u can now disable with [] or false. To not introduce braking change 'is' is still default when not filled.

localusercamp commented 1 year ago

Thanks, thats great!