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

Method isQuoteClose

src/rowSplit.ts:163–176  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

161 str[1] === escape && (str[2] === quote || str.length === 2));
162 }
163 private isQuoteClose(str: string): boolean {
164 const quote = this.quote;
165 const escape = this.escape;
166 if (this.conv.parseParam.trim) {
167 str = trimRight(str);
168 }
169 let count = 0;
170 let idx = str.length - 1;
171 while (str[idx] === quote || str[idx] === escape) {
172 idx--;
173 count++;
174 }
175 return count % 2 !== 0;
176 }
177
178 // private twoDoubleQuote(str: string): string {
179 // var twoQuote = this.quote + this.quote;

Callers 4

toCSVRowMethod · 0.95
browser.jsFile · 0.80
csvtojson.min.jsFile · 0.80
rowSplit.jsFile · 0.80

Calls 1

trimRightFunction · 0.90

Tested by

no test coverage detected