index.js
function array(input, level, options) {
  var spaces = options.spaces;
  var inner = indent(level, spaces);
  var outer = indent(level - 1, spaces);

  var str = input
    .map(function (value) {
      return inner + format(value, level + 1, options);
    })
    .join(',\n');

  return [ '[', str, outer + ']' ].join('\n');
}
function array(input, level, options) {
  var spaces = options.spaces;
  var inner = indent(level, spaces);
  var outer = indent(level - 1, spaces);

  var str = input
    .map(function (value) {
      return inner + format(value, level + 1, options);
    })
    .join(',\n');

  return [ '[', str, outer + ']' ].join('\n');
}
function array ( input , level , options ) { var spaces = options . spaces ; var inner = indent ( level , spaces ) ; var outer = indent ( level - 1 , spaces ) ; var str = input . map ( function ( value ) { return inner + format ( value , level + 1 , options ) ; } ) . join ( ',\n' ) ; return [ '[' , str , outer + ']' ] . join ( '\n' ) ; }
JSON format an array directly.

@param {Object} input
@param {Number} level
@param {Object} options
@returns {String}
JSON format an array directly .