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

Function styleChanged

src/helpers/helpers.segment.js:349–364  ·  view source on GitHub ↗
(style, prevStyle)

Source from the content-addressed store, hash-verified

347}
348
349function styleChanged(style, prevStyle) {
350 if (!prevStyle) {
351 return false;
352 }
353 const cache = [];
354 const replacer = function(key, value) {
355 if (!isPatternOrGradient(value)) {
356 return value;
357 }
358 if (!cache.includes(value)) {
359 cache.push(value);
360 }
361 return cache.indexOf(value);
362 };
363 return JSON.stringify(style, replacer) !== JSON.stringify(prevStyle, replacer);
364}

Callers 1

doSplitByStylesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected