@aegenet/belt-symbols-is-balanced
v2.3.0
Published
Symbols is balanced ?
Downloads
81
Readme
@aegenet/belt-symbols-is-balanced
Symbols is balanced (
[
,(
{
) ?
💾 Installation
yarn add @aegenet/belt-symbols-is-balanced@^2.0.0
# or
npm i @aegenet/belt-symbols-is-balanced@^2.0.0
📝 Usage
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