zeptomatch-escape

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

MIT 2 个版本
安装
npm install zeptomatch-escape
yarn add zeptomatch-escape
pnpm add zeptomatch-escape
bun add zeptomatch-escape
README

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

版本列表
1.0.1 2025-03-05
1.0.0 2024-03-27