{
  "_args": [
    [
      "ast-traverse@~0.1.1",
      "/media/Github/Vertinext2/src/node_modules/defs"
    ]
  ],
  "_from": "ast-traverse@>=0.1.1 <0.2.0",
  "_id": "ast-traverse@0.1.1",
  "_inCache": true,
  "_installable": true,
  "_location": "/ast-traverse",
  "_npmUser": {
    "email": "olov.lassus@gmail.com",
    "name": "olov"
  },
  "_npmVersion": "1.2.18",
  "_phantomChildren": {},
  "_requested": {
    "name": "ast-traverse",
    "raw": "ast-traverse@~0.1.1",
    "rawSpec": "~0.1.1",
    "scope": null,
    "spec": ">=0.1.1 <0.2.0",
    "type": "range"
  },
  "_requiredBy": [
    "/defs"
  ],
  "_resolved": "https://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz",
  "_shasum": "69cf2b8386f19dcda1bb1e05d68fe359d8897de6",
  "_shrinkwrap": null,
  "_spec": "ast-traverse@~0.1.1",
  "_where": "/media/Github/Vertinext2/src/node_modules/defs",
  "author": {
    "email": "olov.lassus@gmail.com",
    "name": "Olov Lassus"
  },
  "bugs": {
    "url": "https://github.com/olov/ast-traverse/issues"
  },
  "dependencies": {},
  "description": "simple but flexible AST traversal with pre and post visitors",
  "devDependencies": {},
  "directories": {},
  "dist": {
    "shasum": "69cf2b8386f19dcda1bb1e05d68fe359d8897de6",
    "tarball": "http://registry.npmjs.org/ast-traverse/-/ast-traverse-0.1.1.tgz"
  },
  "homepage": "https://github.com/olov/ast-traverse#readme",
  "keywords": [
    "ast",
    "traverse",
    "traversal",
    "walk",
    "visit",
    "visitor",
    "esprima"
  ],
  "license": "MIT",
  "main": "ast-traverse.js",
  "maintainers": [
    {
      "email": "olov.lassus@gmail.com",
      "name": "olov"
    }
  ],
  "name": "ast-traverse",
  "optionalDependencies": {},
  "readme": "# ast-traverse.js\nSimple but flexible AST traversal with pre and post visitors.\nWorks in node and browsers.\n\n\n\n## Usage\n```javascript\n// ast is a Mozilla Parser API compatible structure\n// generated by Esprima or another parser\nvar ast = require(\"esprima\").parse(\"f(1, x) + 2\");\n\nvar traverse = require(\"ast-traverse\");\n\n// print AST node types, pre-order (node first, then its children)\ntraverse(ast, {pre: function(node, parent, prop, idx) {\n    console.log(node.type + (parent ? \" from parent \" + parent.type +\n        \" via \" + prop + (idx !== undefined ? \"[\" + idx + \"]\" : \"\") : \"\"));\n}});\nconsole.log();\n/*\n =>\n Program\n ExpressionStatement from parent Program via body[0]\n BinaryExpression from parent ExpressionStatement via expression\n CallExpression from parent BinaryExpression via left\n Identifier from parent CallExpression via callee\n Literal from parent CallExpression via arguments[0]\n Identifier from parent CallExpression via arguments[1]\n Literal from parent BinaryExpression via right\n */\n\n\n// you can also visit post-order, or both\n// all four arguments are provided to both visitors (left out unused below)\nvar indent = 0;\ntraverse(ast, {\n    pre: function(node) {\n        console.log(Array(indent + 1).join(\" \") + node.type);\n        indent += 4;\n    },\n    post: function() {\n        indent -= 4;\n    }\n});\nconsole.log();\n/*\n=>\n Program\n     ExpressionStatement\n         BinaryExpression\n             CallExpression\n                 Identifier\n                 Literal\n                 Identifier\n             Literal\n*/\n\n\n// return false from the pre-visitor to skip traversing its children\n// throw an exception to abort traversal\n\n\n// by default node property names beginning with $ are skipped\n// but you can supply your own skipProperty function instead\ntraverse(ast, {\n    pre: function(node) {\n        console.log(node.type);\n    },\n    skipProperty: function(prop, node) {\n        return prop === \"parent\" || prop === \"expression\";\n    }\n});\n/*\n=>\n Program\n ExpressionStatement\n*/\n```\n\n\n\n## Installation\n\n### Node\nInstall using npm\n\n    npm install ast-traverse\n\n```javascript\nvar traverse = require(\"ast-traverse\");\n```\n\n### Browser\nClone the repo and include it in a script tag\n\n    git clone https://github.com/olov/ast-traverse.git\n\n```html\n<script src=\"ast-traverse/ast-traverse.js\"></script>\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/olov/ast-traverse.git"
  },
  "scripts": {},
  "version": "0.1.1"
}
