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

Function normalizeKeys

src/common/object.js:4–8  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

2let deepDiff;
3
4export function normalizeKeys(key) {
5 if (key == null) return [];
6 if (Array.isArray(key)) return key;
7 return `${key}`.split('.').filter(Boolean);
8}
9
10export function objectGet(obj, rawKey) {
11 for (const key of normalizeKeys(rawKey)) {

Callers 7

getOptionFunction · 0.90
setOptionFunction · 0.90
getFunction · 0.90
setFunction · 0.90
getKeysFunction · 0.90
objectGetFunction · 0.85
objectSetFunction · 0.85

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected