Package detail

available-regexp-flags

inspect-js1.2kMIT1.0.4

Which regular expression flags does the current environment support?

regexp, regular expression, regex, flags

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.4 - 2024-02-21

Commits

  • [types] fix omission of v flag 81a2875

v1.0.3 - 2024-02-21

Commits

  • add types 7c1f6ac
  • [Refactor] remove get-intrinsic d940026
  • [Deps] update get-intrinsic, has-proto, safe-array-concat c37e7f4
  • [Dev Deps] update aud, npmignore, tape 674b2c4
  • [Dev Deps] update @ljharb/eslint-config, aud, tape 6a52504
  • [readme] remove dead badges de7b600
  • [Deps] update get-intrinsic 85cc285
  • [meta] add sideEffects flag 8e57b4b

v1.0.2 - 2023-04-20

Commits

  • [Refactor] use safe-array-concat 6e53889

v1.0.1 - 2023-03-03

Commits

  • [meta] use npmignore to autogenerate an npmignore file e75bde0
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, foreach, tape f3f114f
  • [actions] update rebase action to use reusable workflow ddc794f
  • [Robustness] make properties a null object de0c837
  • [Dev Deps] update @ljharb/eslint-config, aud, tape 3889fe5
  • [Tests] use for-each instead of foreach f551a42
  • [Deps] update get-intrinsic fc5a191
  • [Deps] update get-intrinsic 896b0cd

v1.0.0 - 2022-01-13

Commits