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

Function emits_separator

packages/csv-stringify/lib/api/index.js:13–20  ·  view source on GitHub ↗
(value, separator)

Source from the content-addressed store, hash-verified

11// Such fields must be quoted to round-trip, like RFC 4180 fields containing the
12// delimiter, generalized to multi-character delimiters and record delimiters.
13const emits_separator = function (value, separator) {
14 return (
15 separator.length !== 0 &&
16 (value.indexOf(separator) !== -1 ||
17 (separator.length > 1 &&
18 (value + separator).indexOf(separator) < value.length))
19 );
20};
21
22const stringifier = function (options, state, info) {
23 return {

Callers 1

stringifierFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected