(str, delimiter, quoteChar = '"')
| 17650 | return this.fromDelimited(str, "\t", '"') |
| 17651 | } |
| 17652 | static fromDelimited(str, delimiter, quoteChar = '"') { |
| 17653 | str = str.replace(/\r/g, "") // remove windows newlines if present |
| 17654 | const rows = this._getEscapedRows(str, delimiter, quoteChar) |
| 17655 | return this._rowsToParticle(rows, delimiter, true) |
| 17656 | } |
| 17657 | static _getEscapedRows(str, delimiter, quoteChar) { |
| 17658 | return str.includes(quoteChar) ? this._strToRows(str, delimiter, quoteChar) : str.split("\n").map(line => line.split(delimiter)) |
| 17659 | } |
no test coverage detected