find-closing-symbol
Find closing symbol (parentheses, curly braces...)
Install
npm i find-closing-symbol
Usage
var findClosingSymbol = require('find-closing-symbol');
var findClosingParenthesis = findClosingSymbol('(', ')');
findClosingParenthesis('2 + (5 + 1)) * 5'); // => 12
See spec.