Pairify

1.1Kb library that finds balanced matches in your code.

DocumentationAuthor

import pairify from 'pairify';

const pairs = pairify.analyze(code);

Where you may need this?

Pairify is doing a simple loop over all the characters in the provided string. It is not doing a lexical parsing which makes it pretty fast. It may be used in developer and analysis tools that operate on static code.