esctags
javascript ctags
Usage
npm install -g esctagsesctags /path/to/xxx.js
Example
var c;function Bar() { this.a = 1;}Bar.prototype.xxxx = function () { var yyy = 1;};Bar.x = 1; var b = { x: 1, y: { a: 1, b: function () { var a = 1; } }}; b.c = 1;
Ouput:
c /Users/hushicai/data/test/esctags-sample/b.js /^c$/;" v line:1Bar /Users/hushicai/data/test/esctags-sample/b.js /^Bar$/;" c line:2a /Users/hushicai/data/test/esctags-sample/b.js /^a$/;" p line:3 context:Barxxxx /Users/hushicai/data/test/esctags-sample/b.js /^xxxx$/;" c line:5 context:Bar::prototypeyyy /Users/hushicai/data/test/esctags-sample/b.js /^yyy$/;" v line:6 context:Bar::prototype::xxxxx /Users/hushicai/data/test/esctags-sample/b.js /^x$/;" p line:8 context:Barb /Users/hushicai/data/test/esctags-sample/b.js /^b$/;" c line:10x /Users/hushicai/data/test/esctags-sample/b.js /^x$/;" p line:11 context:by /Users/hushicai/data/test/esctags-sample/b.js /^y$/;" c line:12 context:ba /Users/hushicai/data/test/esctags-sample/b.js /^a$/;" p line:13 context:b::yb /Users/hushicai/data/test/esctags-sample/b.js /^b$/;" c line:14 context:b::ya /Users/hushicai/data/test/esctags-sample/b.js /^a$/;" v line:15 context:b::y::bc /Users/hushicai/data/test/esctags-sample/b.js /^c$/;" p line:20 context:b
It can also work with amdjs and commonjs module.