MCPcopy Create free account
hub / github.com/adobe/react-spectrum / filterKeys

Function filterKeys

scripts/migrateIntl.mjs:65–73  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

63
64// remove properties from an object if they are not in the set of strings to allow
65function filterKeys(obj) {
66 let newObj = {};
67 for (let [key, value] of Object.entries(obj)) {
68 if (stringsToAllow.has(key)) {
69 newObj[key] = value;
70 }
71 }
72 return newObj;
73}
74
75function readJsonSync(filePath) {
76 try {

Callers 1

migrateIntl.mjsFile · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected