MCPcopy
hub / github.com/chartjs/Chart.js / splitNewlines

Function splitNewlines

src/plugins/plugin.tooltip.js:113–118  ·  view source on GitHub ↗

* Returns array of strings split by newline * @param {*} str - The value to split by newline. * @returns {string|string[]} value if newline present - Returned from String split() method * @function

(str)

Source from the content-addressed store, hash-verified

111 * @function
112 */
113function splitNewlines(str) {
114 if ((typeof str === 'string' || str instanceof String) && str.indexOf('\n') > -1) {
115 return str.split('\n');
116 }
117 return str;
118}
119
120
121/**

Callers 4

getBeforeAfterBodyLinesFunction · 0.85
getTitleMethod · 0.85
getBodyMethod · 0.85
getFooterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected