@types/re-template-tag
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Installation

npm install --save @types/re-template-tag

Summary

This package contains type definitions for re-template-tag (https://github.com/rauschma/re-template-tag).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/re-template-tag.

index.d.ts

/**
 * A template tag for composing regular expressions.
 *
 * @example
 * import { re } from 're-template-tag';
 *
 * const RE_YEAR = /([0-9]{4})/;
 * const RE_MONTH = /([0-9]{2})/;
 * const RE_DAY = /([0-9]{2})/;
 * const RE_DATE = re`/^${RE_YEAR}-${RE_MONTH}-${RE_DAY}$/u`;
 *
 * RE_DATE.test('2017-01-23'); // true
 */
export function re(strs: TemplateStringsArray, ...substs: Array<string | RegExp>): RegExp;

/**
 * All special characters are escaped, because you may want to quote several characters inside parentheses or square brackets.
 */
export function quoteText(text: string): string;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/re-template-tag

Weekly Downloads

8

Version

2.0.2

License

MIT

Unpacked Size

3.8 kB

Total Files

5

Last publish

Collaborators

  • types