0.0.1 • Published 9 years ago
esvalidator v0.0.1
ESValidator
ESValidator is a simple static validation tool powered by esprima. It makes validating code structure easier.
Installation
npm install esvalidator
Usage
var fs = require("fs");
var ESValidator = require("esvalidator");
var code = fs.readFileSync("someCode.js").toString();
var validator = new ESValidator(code);
if (validator.contain("outerMethod", "innerMethod")) {
console.log("There is CallExpression of innerMethod in outerMethod!");
}
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
0.0.1
- The first version
License
MIT License
0.0.1
9 years ago