Skip to content

Which regular expression flags does the current environment support?

License

Notifications You must be signed in to change notification settings

inspect-js/available-regexp-flags

Repository files navigation

available-regexp-flags Version Badge

github actions coverage License Downloads

npm badge

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

About

Which regular expression flags does the current environment support?

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy