MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / checkTypes

Function checkTypes

src/content-scripts/clientAPITypeCheck.js:57–62  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

55};
56
57export function checkTypes(data) {
58 enforceTypeWhitelist(data, dataTypes);
59 if (data.options && typeof data.options === 'object') {
60 enforceTypeWhitelist(data.options, optionsTypes);
61 }
62}
63
64function enforceTypeWhitelist(data, whitelist) {
65 const parameters = Object.keys(data) || [];

Callers 1

addListenerFunction · 0.90

Calls 1

enforceTypeWhitelistFunction · 0.85

Tested by

no test coverage detected