We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f71b970 commit 58314b4Copy full SHA for 58314b4
JavaScript/6-keys.js
@@ -0,0 +1,11 @@
1
+'use strict';
2
+
3
+const data = { name: 'Marcus Aurelius', city: 'Rome', _born: 121 };
4
5
+const person = new Proxy(data, {
6
+ ownKeys(obj) {
7
+ return Object.keys(obj).filter(name => !name.startsWith('_'));
8
+ }
9
+});
10
11
+console.dir(Object.keys(person));
0 commit comments