UNPKG

@n3okill/utils

Version:
13 lines 499 B
import { toString } from "../string/toString"; import { balanced as balancedString } from "../string/balanced"; /** * Return `false` if buffer is unbalanced, or * an Array<BalancedDataBuffer> mapping the chunks of 'open' and 'close' locations, if input buffer is unbalanced will return empty * @param input * @param open * @param close */ export function balanced(input, open = "{", close = "}") { return balancedString(toString(input), open, close); } //# sourceMappingURL=balanced.js.map