MCPcopy Create free account
hub / github.com/UI5/webcomponents / shouldUpdate

Function shouldUpdate

packages/base/src/ManagedStyles.ts:9–14  ·  view source on GitHub ↗
(runtimeIndex: string | undefined)

Source from the content-addressed store, hash-verified

7};
8
9const shouldUpdate = (runtimeIndex: string | undefined) => {
10 if (runtimeIndex === undefined) {
11 return true;
12 }
13 return compareRuntimes(getCurrentRuntimeIndex(), parseInt(runtimeIndex)) >= 1; // 1 or larger means the current is newer, 0 means the same, -1 means the resource's runtime is newer
14};
15
16const createStyle = (content: string, name: string, value = "", theme?: string) => {
17 const currentRuntimeIndex = getCurrentRuntimeIndex();

Callers 1

updateStyleFunction · 0.70

Calls 2

compareRuntimesFunction · 0.85
getCurrentRuntimeIndexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…