parsist
Raw text parser, cleaner and formatter
Install
npm i -s parsist
Docs
: string | string[] Parse and clean a string of raw items based on the given regex-character delimiters @param raw — Raw text/paragraph to parse and clean@param delimiters — Delimiters must be valid regex characters@param toString — Whether to get the result as a string or not (return an array of strings)@param separator — Used as the item separator when returning a string
Use
let raw = ` sample ,, raw . text * to parse` let delimiter = '[\\.\\,\\n\\*\\t]' // Example 1console // Example 2console
Outputs
samplerawtexttoparse
sample, raw, text, to, parse
Check parsist/sample/index.js for specific use cases