MCPcopy Create free account
hub / github.com/chartjs/Chart.js / pushOrConcat

Function pushOrConcat

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

Source from the content-addressed store, hash-verified

128
129// Helper to push or concat based on if the 2nd parameter is an array or not
130function pushOrConcat(base, toPush) {
131 if (toPush) {
132 if (isArray(toPush)) {
133 // base = base.concat(toPush);
134 Array.prototype.push.apply(base, toPush);
135 } else {
136 base.push(toPush);
137 }
138 }
139
140 return base;
141}
142
143/**
144 * 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