{"name":"glsl-token-whitespace-trim","version":"1.0.0","description":"Trim the whitespace within an array of GLSL tokens","main":"index.js","license":"MIT","author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"https://github.com/hughsk"},"dependencies":{},"devDependencies":{"gl":"^2.1.5","gl-shader":"^4.0.6","glsl-token-string":"^1.0.1","glsl-tokenizer":"^2.0.2","standard":"^5.4.1","tap-spec":"^4.1.1","tape":"^4.2.2"},"scripts":{"test":"standard && node test.js | tspec"},"keywords":["glsl","token","tokenizer","glslify","ecosystem:stackgl","whitespace","trim"],"repository":{"type":"git","url":"git://github.com/hughsk/glsl-token-whitespace-trim.git"},"homepage":"https://github.com/hughsk/glsl-token-whitespace-trim","bugs":{"url":"https://github.com/hughsk/glsl-token-whitespace-trim/issues"},"gitHead":"46d2e1fc26b904d126568421c61001c8697369d2","_id":"glsl-token-whitespace-trim@1.0.0","_shasum":"46d1dfe98c75bd7d504c05d7d11b1b3e9cc93b10","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"dist":{"shasum":"46d1dfe98c75bd7d504c05d7d11b1b3e9cc93b10","tarball":"http://registry-npm.ywwl.com/glsl-token-whitespace-trim/download/glsl-token-whitespace-trim-1.0.0.tgz","integrity":"sha512-ZJtsPut/aDaUdLUNtmBYhaCmhIjpKNg7IgZSfX5wFReMc2vnj8zok+gB/3Quqs0TsBSX/fGnqUUYZDqyuc2xLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCudBuFetiZfKwTySeD6xC5fsHJvSC1GVCiVJmjUbkdHAIgeV3GuNPYzw8unIOzQhvHhjgSAw8+YiOg5vSLW2xxPFE="}],"size":2833,"noattachment":false,"key":"/glsl-token-whitespace-trim/-/glsl-token-whitespace-trim-1.0.0.tgz"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"directories":{},"readme":"# glsl-token-whitespace-trim\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nTrim the whitespace within an array of GLSL tokens provided by [glsl-tokenizer](https://github.com/stackgl/glsl-tokenizer). Useful for minimising shader source size, especially after heavy processing steps such as seen in [glslify](http://github.com/stackgl/glslify) or as part of a GLSL minifier.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/glsl-token-whitespace-trim.png)](https://www.npmjs.com/package/glsl-token-whitespace-trim)\n\n### `trim(tokens, [all])`\n\nTrims the whitespace in an array of GLSL `tokens`. By default, this will trim repeated to newlines such that no more than two newlines will appear in a row.\n\nIf you're more concerned about size than aesthetics, you can pass `true` as the second argument to remove *all* extraneous whitespace (more or less).\n\n``` javascript\nconst tokenize = require('glsl-tokenizer')\nconst string = require('glsl-token-string')\nconst trim = require('glsl-token-whitespace-trim')\nconst fs = require('fs')\n\nconst src = fs.readFileSync('shader.glsl', 'utf8')\nconst tokens = tokenize(src)\n\ntrim(tokens, true)\n\nconst trimmed = string(tokens)\n```\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/hughsk/glsl-token-whitespace-trim/blob/master/LICENSE.md) for details.\n","publish_time":1448365516025,"_cnpm_publish_time":1448365516025,"dist-tags":{"latest":"1.0.0"}}