Symbols is balanced (
[
,(
{
) ?
yarn add @aegenet/belt-symbols-is-balanced@^2.0.0
# or
npm i @aegenet/belt-symbols-is-balanced@^2.0.0
import { symbolsIsBalanced } from '@aegenet/belt-symbols-is-balanced';
symbolsIsBalanced('( { [ () [] ] } )') // true
symbolsIsBalanced('( { [ ') // false
symbolsIsBalanced('( 1 === 1 )') // true
symbolsIsBalanced('( (1 === 1) )') // true
symbolsIsBalanced('( ([1] === [1]) )') // true
symbolsIsBalanced('( ([1] {===} [1]) )') // true
symbolsIsBalanced('( /* (( */ )') // true