glsl-version-regex
v1.0.0
Published
a regex for GLSL version statements
Downloads
11
Maintainers
Readme
glsl-version-regex
A regex for GLSL version statements.
var version = require('glsl-version-regex')
version.test('#version 300')
//=> true
version.test('#version')
//=> false
version.exec('#version 100')
//=> [ ..., '100', ... ]
version.exec('#version 300 es // comment')
//=> [ ..., '300 es', ... ]
Usage
regex = require('glsl-version-regex')
Requiring this module will provide you with the regex.
License
MIT, see LICENSE.md for details.