| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ab8f060 commit f1e7648
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -672,7 +672,7 @@ function invalidArgTypeHelper(input) { | |||
| 672 | 672 | return ` Received type ${typeof input} (${inspected})`; | |
| 673 | 673 | } | |
| 674 | 674 | ||
| 675 | - module.exports = { | ||
| 675 | + const common = { | ||
| 676 | 676 | allowGlobals, | |
| 677 | 677 | buildType, | |
| 678 | 678 | canCreateSymLink, | |
@@ -815,3 +815,12 @@ module.exports = { | |||
| 815 | 815 | } | |
| 816 | 816 | ||
| 817 | 817 | }; | |
| 818 | + | ||
| 819 | + const validProperties = new Set(Object.keys(common)); | ||
| 820 | + module.exports = new Proxy(common, { | ||
| 821 | + get(obj, prop) { | ||
| 822 | + if (!validProperties.has(prop)) | ||
| 823 | + throw new Error(`Using invalid common property: '${prop}'`); | ||
| 824 | + return obj[prop]; | ||
| 825 | + } | ||
| 826 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments