Skip to content

fabiospampinato/zeptomatch-escape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published