MCPcopy
hub / github.com/adaltas/node-csv / push

Function push

packages/csv-parse/lib/sync.js:10–15  ·  view source on GitHub ↗
(record)

Source from the content-addressed store, hash-verified

8 const records = opts && opts.objname ? Object.create(null) : [];
9 const parser = transform(opts);
10 const push = (record) => {
11 if (parser.options.objname === undefined) records.push(record);
12 else {
13 records[record[0]] = record[1];
14 }
15 };
16 const close = () => {};
17 const error = parser.parse(data, true, push, close);
18 if (error !== undefined) throw error;

Callers 1

stringifierFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected