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

Function pushOrConcat

src/plugins/plugin.tooltip.js:94–105  ·  view source on GitHub ↗
(base, toPush)

Source from the content-addressed store, hash-verified

92
93// Helper to push or concat based on if the 2nd parameter is an array or not
94function pushOrConcat(base, toPush) {
95 if (toPush) {
96 if (isArray(toPush)) {
97 // base = base.concat(toPush);
98 Array.prototype.push.apply(base, toPush);
99 } else {
100 base.push(toPush);
101 }
102 }
103
104 return base;
105}
106
107/**
108 * Returns array of strings split by newline

Callers 4

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

Calls 2

isArrayFunction · 0.85
applyMethod · 0.80

Tested by

no test coverage detected