MCPcopy
hub / github.com/cssinjs/jss / mergeRest

Function mergeRest

packages/jss-plugin-extend/src/index.js:52–68  ·  view source on GitHub ↗
(style, rule, sheet, newStyle)

Source from the content-addressed store, hash-verified

50}
51
52function mergeRest(style, rule, sheet, newStyle) {
53 // Copy base style.
54 for (const prop in style) {
55 if (prop === 'extend') continue
56 if (isObject(newStyle[prop]) && isObject(style[prop])) {
57 extend(style[prop], rule, sheet, newStyle[prop])
58 continue
59 }
60
61 if (isObject(style[prop])) {
62 newStyle[prop] = extend(style[prop], rule, sheet)
63 continue
64 }
65
66 newStyle[prop] = style[prop]
67 }
68}
69
70/**
71 * Recursively extend styles.

Callers 1

extendFunction · 0.85

Calls 2

isObjectFunction · 0.85
extendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…