dist/index.js
// Internal implementation of a recursive `flatten` function.
Internal implementation of a recursive `flatten` function.
Internal implementation of a recursive ` flatten ` function .
function _flatten(input, shallow, strict, output) {
    output = output || [];
    var idx = output.length;
    for (var i = 0, length = getLength(input); i < length; i++) {
      var value = input[i];
      if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
        if (shallow) {
          var j = 0, len = value.length;
          while (j < len) output[idx++] = value[j++];
        } else {
          _flatten(value, shallow, strict, output);
          idx = output.length;
        }
      } else if (!strict) {
        output[idx++] = value;
      }
    }
    return output;
  }
function _flatten ( input , shallow , strict , output ) { output = output || [ ] ; var idx = output . length ; for ( var i = 0 , length = getLength ( input ) ; i < length ; i ++ ) { var value = input [ i ] ; if ( isArrayLike ( value ) && ( isArray ( value ) || isArguments ( value ) ) ) { if ( shallow ) { var j = 0 , len = value . length ; while ( j < len ) output [ idx ++ ] = value [ j ++ ] ; } else { _flatten ( value , shallow , strict , output ) ; idx = output . length ; } } else if ( ! strict ) { output [ idx ++ ] = value ; } } return output ; }
Internal implementation of a recursive `flatten` function.
Internal implementation of a recursive ` flatten ` function .
// Flatten current level of array or arguments object.