包详细信息

zeptomatch-escape

fabiospampinato28.8kMIT1.0.1

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

zeptomatch, escape, glob

自述文件

Zeptomatch Escape

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

Install

npm install zeptomatch-escape

Usage

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

// Escaping 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