CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-picomatch

Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.

83

1.45x
Overview
Eval results
Files

task.mdevals/scenario-2/

Pattern Regex Compiler

A utility that compiles glob patterns into regular expressions for custom pattern matching.

Capabilities

Parse and Compile Patterns

  • Given a glob pattern string, parse it and compile it into a regular expression @test
  • Given a complex glob pattern with wildcards, compile it into a working regex @test

Test Compiled Patterns

  • Given a compiled regex and input string, test if the input matches the pattern @test

Implementation

@generates

API

/**
 * Compiles a glob pattern into a regular expression
 * @param {string} pattern - The glob pattern to compile
 * @returns {RegExp} The compiled regular expression
 */
function compilePattern(pattern) {}

/**
 * Tests if a string matches the compiled pattern
 * @param {string} input - The string to test
 * @param {RegExp} regex - The compiled regular expression
 * @returns {boolean} True if the string matches
 */
function testMatch(input, regex) {}

module.exports = {
  compilePattern,
  testMatch
};

Dependencies { .dependencies }

picomatch { .dependency }

Provides glob pattern parsing and regex compilation support.

Install with Tessl CLI

npx tessl i tessl/npm-picomatch

tile.json