1.0.0 • Published 3 months ago

zeptomatch-escape v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

Zeptomatch Escape

A little utility for escaping globs before passing them to zeptomatch.

Install

npm install --save zeptomatch-escape

Usage

import zeptomatch from 'zeptomatch';
import escape from 'zeptomatch-escape';

// Escape special characters from a string

escape ( '*.js' ); // => '\\*.js'

// Example usage

zeptomatch ( '*.js', 'a.js' ) ); // => true
zeptomatch ( '*.js', '*.js' ) ); // => true

zeptomatch ( escape ( '*.js' ), 'a.js' ) ); // => false
zeptomatch ( escape ( '*.js' ), '*.js' ) ); // => true

License

MIT © Fabio Spampinato

1.0.0

3 months ago