or run

npx @tessl/cli init
Log in

Version

Files

tile.json

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.