MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / isEmpty

Function isEmpty

src/common/util.js:205–212  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

203
204// Used by `injected`
205export function isEmpty(obj) {
206 for (const key in obj) {
207 if (hasOwnProperty(obj, key)) {
208 return false;
209 }
210 }
211 return true;
212}
213
214export function ensureArray(data) {
215 return Array.isArray(data) ? data : [data];

Callers 10

UpdatedValuesFunction · 0.90
toggleHeaderInjectorFunction · 0.90
setMenusFunction · 0.90
setFunction · 0.90
watchStorageFunction · 0.90
flushFunction · 0.90
flushLaterFunction · 0.90
clearValueOpenerFunction · 0.90
broadcastFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected