{"_id":"glsl-token-defines","_rev":"443962","name":"glsl-token-defines","description":"Retrieve the values defined with preprocessor statements in a selection of GLSL tokens","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"time":{"modified":"2024-06-19T00:14:05.000Z","created":"2015-03-11T02:11:02.884Z","1.0.0":"2015-03-11T02:11:02.884Z"},"users":{},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-defines.git"},"versions":{"1.0.0":{"name":"glsl-token-defines","version":"1.0.0","description":"Retrieve the values defined with preprocessor statements in a selection 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":{"glsl-tokenizer":"^2.0.0"},"devDependencies":{"tap-spec":"^2.2.1","tape":"^3.5.0"},"repository":{"type":"git","url":"git://github.com/stackgl/glsl-token-defines.git"},"keywords":["ecosystem:stackgl"],"homepage":"https://github.com/stackgl/glsl-token-defines","bugs":{"url":"https://github.com/stackgl/glsl-token-defines/issues"},"gitHead":"5505aa03ff9ae9fe3ada1b2dcb31f1eefb94da23","_id":"glsl-token-defines@1.0.0","_shasum":"cb892aa959936231728470d4f74032489697fa9d","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.36","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"dist":{"shasum":"cb892aa959936231728470d4f74032489697fa9d","tarball":"http://registry-npm.ywwl.com/glsl-token-defines/download/glsl-token-defines-1.0.0.tgz","integrity":"sha512-Vb5QMVeLjmOwvvOJuPNg3vnRlffscq2/qvIuTpMzuO/7s5kT+63iL6Dfo2FYLWbzuiycWpbC0/KV0biqFwHxaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvziyE2nZ+gCJt+ZLRes4xfJSAZ5Unfi8v9xCKhmW7kwIgL3ELsZNGsvzBiSYzFEgq7XX7GR6iWruzstXVWAV0NTc="}],"size":1961,"noattachment":false,"key":"/glsl-token-defines/-/glsl-token-defines-1.0.0.tgz"},"directories":{},"publish_time":1426039862884,"_cnpm_publish_time":1426039862884}},"readme":"# glsl-token-defines\n\n[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\n\nRetrieve the values defined with preprocessor statements in a selection of\n[GLSL tokens](http://github.com/stackgl/glsl-tokenizer).\n\nDoesn't handle full function-style macros for the time being. Patches welcome!\n\n## Usage\n\n[![NPM](https://nodei.co/npm/glsl-token-defines.png)](https://nodei.co/npm/glsl-token-defines/)\n\n### `defs = defines(tokens)`\n\nWhere `tokens` is an array of tokens produced by\n[glsl-tokenizer](http://github.com/stackgl/glsl-tokenizer).\n\nReturns an dictionary object where keys are the name of the defined variable,\nand values are the values of the defined variable. If a variable is not\nassigned a value, this will be an empty string.\n\nFor example, the following:\n\n``` glsl\n#define PI 3.14\n#define TAU (PI*2.)\n#define VEC vec3(1.)\n#define EMPTY\n```\n\nWould yield:\n\n``` javascript\n{\n  PI: '3.14',\n  TAU: '(PI*2.)',\n  VEC: 'vec3(1.)',\n  EMPTY: ''\n}\n```\n\n## Contributing\n\nSee [stackgl/contributing](https://github.com/stackgl/contributing) for details.\n\n## License\n\nMIT. See [LICENSE.md](http://github.com/stackgl/glsl-token-defines/blob/master/LICENSE.md) for details.\n","_attachments":{},"homepage":"https://github.com/stackgl/glsl-token-defines","bugs":{"url":"https://github.com/stackgl/glsl-token-defines/issues"},"license":"MIT"}