lib/index.js
function parse(str, options) {
  var obj = options.object || 'obj'
    , space = options.pretty ? 2 : 0
    , space = options.spaces ? options.spaces : space
    , js = str;
  
  return ''
    + 'var ' + obj + ' = factory();\n'
    + (options.self
      ? 'var self = locals || {};\n' + js
      : 'with (locals || {}) {\n' + js + '\n}\n')
    + 'return JSON.stringify(' + obj + ', null, ' +  space + ')';
}
function parse(str, options) {
  var obj = options.object || 'obj'
    , space = options.pretty ? 2 : 0
    , space = options.spaces ? options.spaces : space
    , js = str;
  
  return ''
    + 'var ' + obj + ' = factory();\n'
    + (options.self
      ? 'var self = locals || {};\n' + js
      : 'with (locals || {}) {\n' + js + '\n}\n')
    + 'return JSON.stringify(' + obj + ', null, ' +  space + ')';
}
function parse ( str , options ) { var obj = options . object || 'obj' , space = options . pretty ? 2 : 0 , space = options . spaces ? options . spaces : space , js = str ; return '' + 'var ' + obj + ' = factory();\n' + ( options . self ? 'var self = locals || {};\n' + js : 'with (locals || {}) {\n' + js + '\n}\n' ) + 'return JSON.stringify(' + obj + ', null, ' + space + ')' ; }
Parse the given `str` of JSON builder and return a function body.

@param {String} str
@param {Object} options
@return {String}
@api private
Parse the given str of JSON builder and return a function body .