xregexp-quotemeta

1.0.7 • Public • Published

xregexp-quotemeta 1.0.7

xregexp-quotemeta augments XRegExp to support the \Q..\E construct for escaping special regular expression characters. The functionality is added as an XRegExp addon. The specific semantics of quotemeta support are described in slevithan/xregexp#85.

Installation and usage

In browsers (bundle XRegExp with all of its addons):

<script src="xregexp-all.js"></script>
<script src="xregexp-quotemeta-inject.js"></script>

Using npm:

npm install xregexp-quotemeta

In Node.js:

const XRegExp = require('xregexp');
const quotemeta = require('xregexp-quotemeta');
quotemeta.addSupportTo(XRegExp);

In an AMD loader like RequireJS:

require(['xregexp', 'xregexp-quotemeta'], function(XRegExp, quotemeta) {
    quotemeta.addSupportTo(XRegExp);
});

About

xregexp-quotemeta copyright 2018 by Brandon Mintern and copyright 2015 by Steven Levithan.

All code, including addons, tools, and tests, is released under the terms of the MIT License.

Package Sidebar

Install

npm i xregexp-quotemeta

Weekly Downloads

3,965

Version

1.0.7

License

MIT

Unpacked Size

5.32 kB

Total Files

5

Last publish

Collaborators

  • mintern