lib/compact.js
function compact(source) {
    if (!source) return null;

    if (isArray(source))
        return compactArray(source);

    if (typeof source == 'object')
        return compactObject(source);

    return source;
}
function compact(source) {
    if (!source) return null;

    if (isArray(source))
        return compactArray(source);

    if (typeof source == 'object')
        return compactObject(source);

    return source;
}
function compact ( source ) { if ( ! source ) return null ; if ( isArray ( source ) ) return compactArray ( source ) ; if ( typeof source == 'object' ) return compactObject ( source ) ; return source ; }
Strip `null` and `undefined` values.

@param  {Object|Array} source
@return {Object|Array}
@api public
Strip null and undefined values .