zeptomatch-escape
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i zeptomatch-escape

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

4.83 kB

Total Files

9

Last publish

Collaborators

  • fabiospampinato