Skip to content

Instantly share code, notes, and snippets.

@lewdev
Last active September 29, 2024 07:36
Show Gist options
  • Save lewdev/c5262a0d43b5f926ff9d4e06a9cdba05 to your computer and use it in GitHub Desktop.
Save lewdev/c5262a0d43b5f926ff9d4e06a9cdba05 to your computer and use it in GitHub Desktop.
πŸ‘€ Using `Reflect.ownKeys` to see Class function names in `Math`, `Array`, `Set`, etc.
<table><tbody><tr id=o></tr></tbody></table>
<script>
o.innerHTML = [window, Set, Array, Math, Number, RegExp, Date]
.map(M=>`<td><h3>${M.name || M}</h3><br>${Reflect.ownKeys(M).map(a=>JSON.stringify(a)).join`<br>`}</td>`).join``;
</script>
<style>*{vertical-align:top}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment