available-regexp-flags
v1.0.4
Published
Which regular expression flags does the current environment support?
Downloads
1,138
Maintainers
Readme
available-regexp-flags
Which regular expression flags does the current environment support?
Example
var flags = require('available-regexp-flags');
var properties = require('available-regexp-flags/properties');
flags.forEach((flag) => {
assert.doesNotThrow(() => {
const r = new RegExp('foo', flag);
var propertyName = properties[flag];
assert.equal(r[propertyName], true);
});
});
Tests
Simply clone the repo, npm install
, and run npm test