{"_id":"glsl-token-depth","_rev":"404055","name":"glsl-token-depth","description":"Determine the scope depth of an array of GLSL tokens","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"155263213@qq.com"},{"name":"erkaman","email":"arnebackeric@gmail.com"},{"name":"gre","email":"renaudeau.gaetan@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"vorg","email":"marcin.ignac@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"time":{"modified":"2021-08-04T04:42:36.000Z","created":"2014-12-14T20:18:41.122Z","1.1.2":"2015-03-11T19:55:53.403Z","1.1.1":"2015-03-06T23:46:17.352Z","1.1.0":"2015-01-04T22:33:11.248Z","1.0.0":"2014-12-14T20:18:41.122Z"},"users":{},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-depth.git"},"versions":{"1.1.2":{"name":"glsl-token-depth","version":"1.1.2","description":"Determine the scope depth of an array of GLSL tokens","main":"index.js","license":"MIT","scripts":{"test":"node test | tap-spec"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"dependencies":{},"devDependencies":{"chalk":"^0.5.1","glsl-tokenizer":"^2.0.0","tap-spec":"^2.1.1","tape":"^3.0.3"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-depth.git"},"keywords":["ecosystem:stackgl","tokens","glsl","syntax"],"homepage":"https://github.com/stackgl/glsl-token-depth","bugs":{"url":"https://github.com/stackgl/glsl-token-depth/issues"},"gitHead":"c8b38fd924033076208fdb57dc34dc773be6a319","_id":"glsl-token-depth@1.1.2","_shasum":"23c5e30ee2bd255884b4a28bc850b8f791e95d84","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.36","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"155263213@qq.com"},{"name":"erkaman","email":"arnebackeric@gmail.com"},{"name":"gre","email":"renaudeau.gaetan@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"vorg","email":"marcin.ignac@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"23c5e30ee2bd255884b4a28bc850b8f791e95d84","size":2201,"noattachment":false,"key":"/glsl-token-depth/-/glsl-token-depth-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/glsl-token-depth/download/glsl-token-depth-1.1.2.tgz"},"directories":{},"publish_time":1426103753403,"_cnpm_publish_time":1426103753403,"_hasShrinkwrap":false},"1.1.1":{"name":"glsl-token-depth","version":"1.1.1","description":"Determine the scope depth of an array of GLSL tokens","main":"index.js","license":"MIT","scripts":{"test":"node test | tap-spec"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"dependencies":{},"devDependencies":{"chalk":"^0.5.1","glsl-tokenizer":"^2.0.0","tap-spec":"^2.1.1","tape":"^3.0.3"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-depth.git"},"keywords":["ecosystem:stackgl","tokens","glsl","syntax"],"homepage":"https://github.com/stackgl/glsl-token-depth","bugs":{"url":"https://github.com/stackgl/glsl-token-depth/issues"},"gitHead":"3874714a464608a30aec69672e58e00ff53a3745","_id":"glsl-token-depth@1.1.1","_shasum":"105b9b1ef8a016e5d2b43c1618c7bfb0179bedaa","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.36","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"155263213@qq.com"},{"name":"erkaman","email":"arnebackeric@gmail.com"},{"name":"gre","email":"renaudeau.gaetan@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"vorg","email":"marcin.ignac@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"105b9b1ef8a016e5d2b43c1618c7bfb0179bedaa","size":2196,"noattachment":false,"key":"/glsl-token-depth/-/glsl-token-depth-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/glsl-token-depth/download/glsl-token-depth-1.1.1.tgz"},"directories":{},"publish_time":1425685577352,"_cnpm_publish_time":1425685577352,"_hasShrinkwrap":false},"1.1.0":{"name":"glsl-token-depth","version":"1.1.0","description":"Determine the scope depth of an array of GLSL tokens","main":"index.js","license":"MIT","scripts":{"test":"node test | tap-spec"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"dependencies":{},"devDependencies":{"chalk":"^0.5.1","glsl-tokenizer":"git://github.com/stackgl/glsl-tokenizer#2.0.0","tap-spec":"^2.1.1","tape":"^3.0.3"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-depth.git"},"keywords":["ecosystem:stackgl","tokens","glsl","syntax"],"homepage":"https://github.com/stackgl/glsl-token-depth","bugs":{"url":"https://github.com/stackgl/glsl-token-depth/issues"},"gitHead":"681b16c1fe0d651566442018960336c959d13295","_id":"glsl-token-depth@1.1.0","_shasum":"394b34862911d8224c31da320efefd03fb5d634c","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.28","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"155263213@qq.com"},{"name":"erkaman","email":"arnebackeric@gmail.com"},{"name":"gre","email":"renaudeau.gaetan@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"vorg","email":"marcin.ignac@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"394b34862911d8224c31da320efefd03fb5d634c","size":2207,"noattachment":false,"key":"/glsl-token-depth/-/glsl-token-depth-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/glsl-token-depth/download/glsl-token-depth-1.1.0.tgz"},"directories":{},"publish_time":1420410791248,"_cnpm_publish_time":1420410791248,"_hasShrinkwrap":false},"1.0.0":{"name":"glsl-token-depth","version":"1.0.0","description":"Determine the scope depth of an array of GLSL tokens","main":"index.js","license":"MIT","scripts":{"test":"node test | tap-spec"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"dependencies":{},"devDependencies":{"glsl-tokenizer":"git://github.com/stackgl/glsl-tokenizer#2.0.0","tap-spec":"^2.1.1","tape":"^3.0.3"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-depth.git"},"keywords":["ecosystem:stackgl","tokens","glsl","syntax"],"homepage":"https://github.com/stackgl/glsl-token-depth","bugs":{"url":"https://github.com/stackgl/glsl-token-depth/issues"},"gitHead":"c7e1125d9cc9719e2af2c038a6e79627b8a3cbb0","_id":"glsl-token-depth@1.0.0","_shasum":"21b9d0ac0ff8516b92c64611b1d9dcfd6b7c0ef4","_from":".","_npmVersion":"2.1.10","_nodeVersion":"0.10.28","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"archmoj","email":"arch.mojtaba.samimi@gmail.com"},{"name":"bpostlethwaite","email":"post.ben.here@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"155263213@qq.com"},{"name":"erkaman","email":"arnebackeric@gmail.com"},{"name":"gre","email":"renaudeau.gaetan@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"mikkoh","email":"me@mikkoh.com"},{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"rezaali","email":"syed.reza.ali@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"tatumcreative","email":"tatum.creative@gmail.com"},{"name":"thibauts","email":"thibaut.seguy@gmail.com"},{"name":"vorg","email":"marcin.ignac@gmail.com"},{"name":"wwwtyro","email":"wwwtyro@gmail.com"},{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"21b9d0ac0ff8516b92c64611b1d9dcfd6b7c0ef4","size":2012,"noattachment":false,"key":"/glsl-token-depth/-/glsl-token-depth-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/glsl-token-depth/download/glsl-token-depth-1.0.0.tgz"},"directories":{},"publish_time":1418588321122,"_cnpm_publish_time":1418588321122,"_hasShrinkwrap":false}},"readme":"# glsl-token-depth\n\n[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\nDetermine the scope depth of an array of GLSL tokens.\n\nUseful for inferring the scope of variables in a GLSL shader without having\nto fully parse the source.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/glsl-token-depth.png)](https://nodei.co/npm/glsl-token-depth/)\n\n### `depth(tokens)`\n\nWhere `tokens` is an array of tokens returned from\n[`glsl-tokenizer`](http://github.com/stackgl/glsl-tokenizer). Each token will\nbe modified in-place, and given a `depth` property.\n\n``` javascript\nvar tokenize = require('glsl-tokenizer/string')\nvar depth    = require('glsl-token-depth')\nvar fs       = require('fs')\n\nvar src = fs.readFileSync('shader.frag', 'utf8')\nvar tokens = tokenize(src)\n\ndepth(tokens)\n\ntokens[0].depth // 0\ntokens[1].depth // 0\ntokens[2].depth // 0\ntokens[3].depth // 0\ntokens[4].depth // 1\n// ...\n```\n\n## See Also\n\n* [stackgl/glsl-tokenizer](http://github.com/stackgl/glsl-tokenizer)\n\n## License\n\nMIT. See [LICENSE.md](http://github.com/stackgl/glsl-token-depth/blob/master/LICENSE.md) for details.\n","_attachments":{},"homepage":"https://github.com/stackgl/glsl-token-depth","bugs":{"url":"https://github.com/stackgl/glsl-token-depth/issues"},"license":"MIT"}