Skip to content

Commit

Permalink
moved all properties to the JASON object
Browse files Browse the repository at this point in the history
  • Loading branch information
xk committed Feb 28, 2012
1 parent fa7d501 commit 385f2ba
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var JASON = (function (exports) {
function stringify (o) {
'use strict';
var cyclic, ademas;
var r= stringify.strfy(o, 'o', stringify.builtInObjects, stringify.builtInPaths, [], [], cyclic= [], ademas= []);
var r= stringify.this._strfy(o, 'o', stringify.this._builtInObjects, stringify.this._builtInPaths, [], [], cyclic= [], ademas= []);

if (cyclic.length || ademas.length) {

Expand Down Expand Up @@ -272,12 +272,15 @@ var JASON = (function (exports) {


function parse (t) {
return Function("t", "return eval( '('+ t+ ')' );")(t);
var globalEval= eval;
return globalEval( '('+ t+ ')' );
}

stringify.strfy= strfy;
stringify.builtInPaths= builtInPaths;
stringify.builtInObjects= builtInObjects;
parse.this= exports;
stringify.this= exports;
exports._strfy= strfy;
exports._builtInPaths= builtInPaths;
exports._builtInObjects= builtInObjects;
exports.parse= parse;
exports.stringify= stringify;
return exports;
Expand Down

0 comments on commit 385f2ba

Please sign in to comment.