Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

denullify

MauriceButler7MIT1.0.0

removes nulls and undefineds from an object

null, undefind, remove, delete

readme

denullify

Removes nulls and undefineds from an object

Example


    var denullify = require('denullify'),

    var data = {
            foo: 'bar',
            thing: null,
            asdf: undefined,
            stuff: {
                majigger: null,
                boop: 'diddly',
                meh: undefined,
            }
        };

    denullify(data)

    /*
    {
        foo: 'bar',
        stuff: {
            boop: 'diddly',
        }
    }
    */