MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / update

Function update

src/theme/list.js:149–160  ·  view source on GitHub ↗
(theme)

Source from the content-addressed store, hash-verified

147 * @param {ThemeBuilder} theme
148 */
149export function update(theme) {
150 if (!(theme instanceof ThemeBuilder)) return;
151 const oldTheme = get(theme.id);
152 if (!oldTheme) {
153 add(theme);
154 return;
155 }
156 const json = theme.toJSON();
157 Object.keys(json).forEach((key) => {
158 oldTheme[key] = json[key];
159 });
160}
161
162export default {
163 get applied() {

Callers 1

showWithMethod · 0.50

Calls 3

getFunction · 0.70
addFunction · 0.70
toJSONMethod · 0.45

Tested by

no test coverage detected