Sha256: 07108116da226784f1958988759776b15a0e1fed1d661d7a8afad36c20084ad7

Contents?: true

Size: 478 Bytes

Versions: 10

Compression:

Stored size: 478 Bytes

Contents

/**
 * The MIT License (MIT)
 * Copyright (c) 2017-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
 */

'use strict';

/**
 * A regexp-tree plugin to remove `x` flag `/foo/x` to `/foo/`.
 *
 * Note: other features of `x` flags (whitespace, comments) are
 * already removed at parsing stage.
 */

module.exports = {
  RegExp: function RegExp(_ref) {
    var node = _ref.node;

    if (node.flags.includes('x')) {
      node.flags = node.flags.replace('x', '');
    }
  }
};

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
condenser-0.0.8 lib/condenser/processors/node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
jester-data-8.0.0 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
ezii-os-5.2.1 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
ezii-os-2.0.1 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
ezii-os-1.1.0 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
ezii-os-1.0.0 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
condenser-0.0.7 lib/condenser/processors/node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
ezii-os-0.0.0.1.0 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
ezii-os-0.0.0.0.1 node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js
condenser-0.0.5 lib/condenser/processors/node_modules/regexp-tree/dist/compat-transpiler/transforms/compat-x-flag-transform.js