@types/balanced-match
- Version 3.0.2
- Published
- 5.46 kB
- No dependencies
- MIT license
Install
npm i @types/balanced-match
yarn add @types/balanced-match
pnpm add @types/balanced-match
Overview
TypeScript definitions for balanced-match
Index
Functions
function balanced
balanced: ( a: string | RegExp, b: string | RegExp, str: string) => Output | undefined;
For the first non-nested matching pair of a and b in str, return an object with those keys: start the index of the first match of
end
the index of the matching bpre
the preamble, a and b not includedbody
the match, a and b not includedpost
the postscript, a and b not included If there's no match,undefined
will be returned. If thestr
contains more a than b / there are unmatched pairs, the first match that was closed will be used. For example,{{a}
will match['{', 'a', '']
and{a}}
will match['', 'a', '}']
function range
range: ( a: string | RegExp, b: string | RegExp, str: string) => [number, number] | undefined;
For the first non-nested matching pair of
a
andb
instr
, return an array with indexes:[ <a index>, <b index> ]
.
Interfaces
interface Output
interface Output {}
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/balanced-match
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/balanced-match)
- HTML<a href="https://www.jsdocs.io/package/@types/balanced-match"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3536 ms. - Missing or incorrect documentation? Open an issue for this package.