mirror of https://github.com/antonmedv/fx
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
278 B
JavaScript
11 lines
278 B
JavaScript
3 months ago
|
const __keys = new Set()
|
||
|
|
||
|
Object.prototype.__keys = function () {
|
||
|
if (Array.isArray(this)) return
|
||
|
if (typeof this === 'string') return
|
||
|
if (this instanceof String) return
|
||
|
if (typeof this === 'object' && this !== null)
|
||
|
Object.keys(this).forEach(x => __keys.add(x))
|
||
|
}
|
||
|
|