1.0.0 • Published 9 years ago

glsl-version-regex v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

glsl-version-regex

stable

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

NPM

regex = require('glsl-version-regex')

Requiring this module will provide you with the regex.

License

MIT, see LICENSE.md for details.