index.js 409 B

123456789101112
  1. var json_stringify = require('./lib/stringify.js').stringify;
  2. var json_parse = require('./lib/parse.js');
  3. module.exports = function(options) {
  4. return {
  5. parse: json_parse(options),
  6. stringify: json_stringify
  7. }
  8. };
  9. //create the default method members with no options applied for backwards compatibility
  10. module.exports.parse = json_parse();
  11. module.exports.stringify = json_stringify;