strip-brackets
Strips unecessary brackets
Usage
Pass it some configuration parameters and it will give you a new function that strips all unnecessary brackets.
Function Signature
output
; const stripSquareBrackets = ;; // => "[a,b],c,d" const stripParens = ;; // => "(a,b),c,d"
Parameters
- openChar
- The opening bracket. Default: `[`
- closeChar
- The closing bracket. Default: `]`
- joinChars
- Characters that indicate that the current part of the string should be wrapped in brackets. Default: `[","]`
- input
- The string you want to strip brackets from
- output
- The resulting string, with unnecessary brackets removed