MCPcopy Create free account
hub / github.com/Keyang/node-csvtojson / stringToLines

Function stringToLines

src/fileline.ts:10–15  ·  view source on GitHub ↗
(data: string, param: ParseRuntime)

Source from the content-addressed store, hash-verified

8 * @return {Object} {lines:[line1,line2...],partial:String}
9 */
10export function stringToLines(data: string, param: ParseRuntime): StringToLinesResult {
11 const eol = getEol(data, param);
12 const lines = data.split(eol);
13 const partial = lines.pop() || "";
14 return { lines: lines, partial: partial };
15};
16
17
18export interface StringToLinesResult {

Callers 2

fileline.test.tsFile · 0.90
processCSVMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected