MCPcopy
hub / github.com/hundredrabbits/Left / validate

Function validate

desktop/sources/scripts/lib/theme.js:92–104  ·  view source on GitHub ↗
(json)

Source from the content-addressed store, hash-verified

90 // Helpers
91
92 function validate (json) {
93 if (!json) { return false }
94 if (!json.background) { return false }
95 if (!json.f_high) { return false }
96 if (!json.f_med) { return false }
97 if (!json.f_low) { return false }
98 if (!json.f_inv) { return false }
99 if (!json.b_high) { return false }
100 if (!json.b_med) { return false }
101 if (!json.b_low) { return false }
102 if (!json.b_inv) { return false }
103 return true
104 }
105
106 function extract (text) {
107 const svg = new DOMParser().parseFromString(text, 'text/xml')

Callers 1

ThemeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected