{"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":"anonymous","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"anonymous","email":"arch.mojtaba.samimi@gmail.com"},{"name":"anonymous","email":"post.ben.here@gmail.com"},{"name":"anonymous","email":"df.creative@gmail.com"},{"name":"anonymous","email":"arnebackeric@gmail.com"},{"name":"anonymous","email":"renaudeau.gaetan@gmail.com"},{"name":"anonymous","email":"hughskennedy@gmail.com"},{"name":"anonymous","email":"dave.des@gmail.com"},{"name":"anonymous","email":"me@mikkoh.com"},{"name":"anonymous","email":"mikolalysenko@gmail.com"},{"name":"anonymous","email":"syed.reza.ali@gmail.com"},{"name":"anonymous","email":"rsreusser@gmail.com"},{"name":"anonymous","email":"tatum.creative@gmail.com"},{"name":"anonymous","email":"thibaut.seguy@gmail.com"},{"name":"anonymous","email":"marcin.ignac@gmail.com"},{"name":"anonymous","email":"wwwtyro@gmail.com"},{"name":"anonymous","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"23c5e30ee2bd255884b4a28bc850b8f791e95d84","size":2201,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/glsl-token-depth/-/glsl-token-depth-1.1.2.tgz","integrity":"sha512-eQnIBLc7vFf8axF9aoi/xW37LSWd2hCQr/3sZui8aBJnksq9C7zMeUYHVJWMhFzXrBU7fgIqni4EhXVW4/krpg=="},"directories":{},"publish_time":1426103753403,"_hasShrinkwrap":false,"_cnpm_publish_time":1426103753403,"_cnpmcore_publish_time":"2021-12-16T22:19:20.100Z","contributors":[]},"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":"anonymous","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"anonymous","email":"arch.mojtaba.samimi@gmail.com"},{"name":"anonymous","email":"post.ben.here@gmail.com"},{"name":"anonymous","email":"df.creative@gmail.com"},{"name":"anonymous","email":"arnebackeric@gmail.com"},{"name":"anonymous","email":"renaudeau.gaetan@gmail.com"},{"name":"anonymous","email":"hughskennedy@gmail.com"},{"name":"anonymous","email":"dave.des@gmail.com"},{"name":"anonymous","email":"me@mikkoh.com"},{"name":"anonymous","email":"mikolalysenko@gmail.com"},{"name":"anonymous","email":"syed.reza.ali@gmail.com"},{"name":"anonymous","email":"rsreusser@gmail.com"},{"name":"anonymous","email":"tatum.creative@gmail.com"},{"name":"anonymous","email":"thibaut.seguy@gmail.com"},{"name":"anonymous","email":"marcin.ignac@gmail.com"},{"name":"anonymous","email":"wwwtyro@gmail.com"},{"name":"anonymous","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"105b9b1ef8a016e5d2b43c1618c7bfb0179bedaa","size":2196,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/glsl-token-depth/-/glsl-token-depth-1.1.1.tgz","integrity":"sha512-TUBSafOYA5FGDejKuKt4+D/HKf7hYKecEKxaOyBAJIsGLj5L2Ke1UU1kupw+4qVE5ahFdPkiXJF95Mexog3L/g=="},"directories":{},"publish_time":1425685577352,"_hasShrinkwrap":false,"_cnpm_publish_time":1425685577352,"_cnpmcore_publish_time":"2021-12-16T22:19:20.305Z","contributors":[]},"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":"anonymous","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"anonymous","email":"arch.mojtaba.samimi@gmail.com"},{"name":"anonymous","email":"post.ben.here@gmail.com"},{"name":"anonymous","email":"df.creative@gmail.com"},{"name":"anonymous","email":"arnebackeric@gmail.com"},{"name":"anonymous","email":"renaudeau.gaetan@gmail.com"},{"name":"anonymous","email":"hughskennedy@gmail.com"},{"name":"anonymous","email":"dave.des@gmail.com"},{"name":"anonymous","email":"me@mikkoh.com"},{"name":"anonymous","email":"mikolalysenko@gmail.com"},{"name":"anonymous","email":"syed.reza.ali@gmail.com"},{"name":"anonymous","email":"rsreusser@gmail.com"},{"name":"anonymous","email":"tatum.creative@gmail.com"},{"name":"anonymous","email":"thibaut.seguy@gmail.com"},{"name":"anonymous","email":"marcin.ignac@gmail.com"},{"name":"anonymous","email":"wwwtyro@gmail.com"},{"name":"anonymous","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"394b34862911d8224c31da320efefd03fb5d634c","size":2207,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/glsl-token-depth/-/glsl-token-depth-1.1.0.tgz","integrity":"sha512-TazQrfTQQkjTGuBv+JU8kJA0/7HOefAmhcZaYI1l6CEzm7UV+G0FfGooqv5XwE2S4CZKkwt0hNQ9YuN3a5mhkQ=="},"directories":{},"publish_time":1420410791248,"_hasShrinkwrap":false,"_cnpm_publish_time":1420410791248,"_cnpmcore_publish_time":"2021-12-16T22:19:20.530Z","contributors":[]},"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":"anonymous","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"anonymous","email":"arch.mojtaba.samimi@gmail.com"},{"name":"anonymous","email":"post.ben.here@gmail.com"},{"name":"anonymous","email":"df.creative@gmail.com"},{"name":"anonymous","email":"arnebackeric@gmail.com"},{"name":"anonymous","email":"renaudeau.gaetan@gmail.com"},{"name":"anonymous","email":"hughskennedy@gmail.com"},{"name":"anonymous","email":"dave.des@gmail.com"},{"name":"anonymous","email":"me@mikkoh.com"},{"name":"anonymous","email":"mikolalysenko@gmail.com"},{"name":"anonymous","email":"syed.reza.ali@gmail.com"},{"name":"anonymous","email":"rsreusser@gmail.com"},{"name":"anonymous","email":"tatum.creative@gmail.com"},{"name":"anonymous","email":"thibaut.seguy@gmail.com"},{"name":"anonymous","email":"marcin.ignac@gmail.com"},{"name":"anonymous","email":"wwwtyro@gmail.com"},{"name":"anonymous","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"21b9d0ac0ff8516b92c64611b1d9dcfd6b7c0ef4","size":2012,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/glsl-token-depth/-/glsl-token-depth-1.0.0.tgz","integrity":"sha512-/BCF9AZqyYOgsQvLexUxqvj1Dr5OEIPs18PSZvQgGSDlA11sw8O5lrEOd5iJyDYAxaoViZIbw/Fdk+ZygVZMVw=="},"directories":{},"publish_time":1418588321122,"_hasShrinkwrap":false,"_cnpm_publish_time":1418588321122,"_cnpmcore_publish_time":"2021-12-16T22:19:20.713Z","contributors":[]}},"dist-tags":{"latest":"1.1.2"},"name":"glsl-token-depth","time":{"created":"2022-01-26T23:27:21.753Z","modified":"2025-12-07T02:22:12.784Z","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"},"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.","users":{}}