10000 fillIn/deepFillIn behaviour on nullish values · Issue #211 · mout/mout · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
fillIn/deepFillIn behaviour on nullish values #211
Open
@satazor

Description

@satazor

At the moment, the fillIn function behavior is different from the mixIn and merge when treating nullish values.

fillIn({
    a: null,
    b: 'foo'
}, {
    a: 'foo',
    b: 'bar'
});

// result -> { a: 'foo', b: 'foo' }
// expected -> { a: null, b: 'foo' }

In my opinion, a null/undefined value should be treated like a normal value, just like mixIn and merge does.
What you guys think?

If you all have the same opinion I can do a PR with the necessary changes and tests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0