canonical
Version:
Canonical code style linter and formatter for JavaScript, SCSS and CSS.
83 lines (82 loc) • 5.37 kB
JSON
{
"_args": [
[
"esrecurse@https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
"/Users/gajus/Documents/dev/canonical-code-style/canonical"
]
],
"_from": "esrecurse@>=3.1.1 <4.0.0",
"_id": "esrecurse@3.1.1",
"_inCache": true,
"_location": "/esrecurse",
"_phantomChildren": {},
"_requested": {
"name": "esrecurse",
"raw": "esrecurse@https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
"rawSpec": "https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
"type": "remote"
},
"_requiredBy": [
"/escope"
],
"_resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
"_shasum": "8feb963699d4d1b2d65a576cd4b1296672a0f0e9",
"_shrinkwrap": null,
"_spec": "esrecurse@https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz",
"_where": "/Users/gajus/Documents/dev/canonical-code-style/canonical",
"bugs": {
"url": "https://github.com/estools/esrecurse/issues"
},
"dependencies": {
"estraverse": "~3.1.0"
},
"description": "ECMAScript scope analyzer",
"devDependencies": {
"chai": "^2.1.1",
"coffee-script": "^1.9.1",
"esprima": "^2.1.0",
"gulp": "~3.8.10",
"gulp-bump": "^0.2.2",
"gulp-eslint": "^0.6.0",
"gulp-filter": "^2.0.2",
"gulp-git": "^1.1.0",
"gulp-mocha": "~2.0.0",
"gulp-tag-version": "^1.2.1",
"jsdoc": "~3.3.0-alpha10",
"minimist": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
},
"homepage": "http://github.com/estools/esrecurse",
"licenses": [
{
"type": "BSD",
"url": "http://github.com/estools/esrecurse/raw/master/LICENSE.BSD"
}
],
"main": "esrecurse.js",
"maintainers": [
{
"name": "Yusuke Suzuki",
"email": "utatane.tea@gmail.com",
"url": "http://github.com/Constellation"
}
],
"name": "esrecurse",
"optionalDependencies": {},
"readme": "### Esrecurse [](http://travis-ci.org/estools/esrecurse)\n\nEsrecurse ([esrecurse](http://github.com/estools/esrecurse)) is\n[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nrecursive traversing functionality.\n\n### Example Usage\n\nThe following code will output all variables declared at the root of a file.\n\n```javascript\nesrecurse.visit(ast, {\n XXXStatement: function (node) {\n this.visit(node.left);\n // do something...\n this.visit(node.right);\n }\n});\n```\n\nWe can use `Visitor` instance.\n\n```javascript\nvar visitor = new esrecurse.Visitor({\n XXXStatement: function (node) {\n this.visit(node.left);\n // do something...\n this.visit(node.right);\n }\n});\n\nvisitor.visit(ast);\n```\n\nWe can inherit `Visitor` instance easily.\n\n```javascript\nfunction DerivedVisitor() {\n esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);\n}\nutil.inherits(DerivedVisitor, esrecurse.Visitor);\nDerivedVisitor.prototype.XXXStatement = function (node) {\n this.visit(node.left);\n // do something...\n this.visit(node.right);\n};\n```\n\nAnd you can invoke default visiting operation inside custom visit operation.\n\n```javascript\nfunction DerivedVisitor() {\n esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */);\n}\nutil.inherits(DerivedVisitor, esrecurse.Visitor);\nDerivedVisitor.prototype.XXXStatement = function (node) {\n // do something...\n this.visitChildren(node);\n};\n```\n\n### License\n\nCopyright (C) 2014 [Yusuke Suzuki](http://github.com/Constellation)\n (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/estools/esrecurse.git"
},
"scripts": {
"lint": "gulp lint",
"test": "gulp travis",
"unit-test": "gulp test"
},
"version": "3.1.1"
}