(obj)
| 63 | |
| 64 | // remove properties from an object if they are not in the set of strings to allow |
| 65 | function 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 | |
| 75 | function readJsonSync(filePath) { |
| 76 | try { |