{
  "name": "tosource",
  "description": "toSource converts JavaScript objects back to source",
  "version": "0.1.1",
  "homepage": "https://github.com/marcello3d/node-tosource",
  "repository": {
    "type": "git",
    "url": "git://github.com/marcello3d/node-tosource.git"
  },
  "author": {
    "name": "Marcello Bastéa-Forte",
    "email": "marcello@cellosoft.com",
    "url": "http://marcello.cellosoft.com/"
  },
  "main": "tosource.js",
  "keywords": [
    "source",
    "tosource",
    "json",
    "javascript object",
    "object"
  ],
  "dependencies": {},
  "engines": {
    "node": ">=0.4.0"
  },
  "readme": "node-tosource\n=============\ntoSource is a super simple function that converts JavaScript objects back to source code.\n\nIntroduction\n------------\nMotivation: JSON doesn't support serializing functions, dates, or regular expressions. I wanted\na quick and simple way to push trusted data structures with code from Node down to the browser.\n\nThis should make it easier to share code and modules between the server and client.\n\nExamples\n--------\nThe following code:\n\n    var toSource = require('tosource')\n    console.log(toSource(\n        [ 4, 5, 6, \"hello\", {\n            a:2,\n            'b':3,\n            '1':4,\n            'if':5,\n            yes:true,\n            no:false,\n            nan:NaN,\n            infinity:Infinity,\n            'undefined':undefined,\n            'null':null,\n            foo: function(bar) {\n                console.log(\"woo! a is \"+a)\n                console.log(\"and bar is \"+bar)\n            }\n        },\n        /we$/gi,\n        new Date(\"Wed, 09 Aug 1995 00:00:00 GMT\")]\n    ))\n\nOutputs:\n\n    [ 4,\n      5,\n      6,\n      \"hello\",\n      { \"1\":4,\n        a:2,\n        b:3,\n        \"if\":5,\n        yes:true,\n        no:false,\n        nan:NaN,\n        infinity:Infinity,\n        \"undefined\":undefined,\n        \"null\":null,\n        foo:function (bar) {\n                console.log(\"woo! a is \"+a)\n                console.log(\"and bar is \"+bar)\n            } },\n      /we$/gi,\n      new Date(807926400000) ]\n\n\nSee [test.js][1] for more examples.\n\nSupported Types\n---------------\n* Numbers\n* Strings\n* Array literals\n* object literals\n* function\n* RegExp literals\n* Dates\n* true\n* false\n* undefined\n* null\n* NaN\n* Infinity\n\nNotes\n-----\n* Functions are serialized with `func.toString()`, no closure properties are serialized\n* Multiple references to the same object become copies\n* Circular references are encoded as `{$circularReference:1}`\n\nLicense\n-------\ntoSource is open source software under the [zlib license][2].\n\n[1]: https://github.com/marcello3d/node-tosource/blob/master/test.js\n[2]: https://github.com/marcello3d/node-tosource/blob/master/LICENSE",
  "_id": "tosource@0.1.1",
  "_from": "tosource@0.1.1"
}
