jsMain.com.bkahlert.kommons.debug.Object.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kommons-debug Show documentation
Show all versions of kommons-debug Show documentation
Kommons Debug is a Kotlin Multiplatform Library for print debugging.
package com.bkahlert.kommons.debug
/**
* The built-in `Object` object.
*
* @see Object
*/
public external object Object {
/**
* Returns the own enumerable property names of the specified [obj] as an array,
* iterated in the same order that a usual loop would.
*/
public fun keys(obj: Any): Array
/**
* Returns the own enumerable string-keyed property [key, value] pairs of the specified [obj] as an array.
*/
public fun entries(obj: Any): Array>
/**
* Returns all properties, including non-enumerable properties except for those which use Symbol, found directly in
* the specified [obj] as an array.
*/
public fun getOwnPropertyNames(obj: Any): Array
}
/**
* Returns the own enumerable property names of this object as an array,
* iterated in the same order that a usual loop would.
*/
public val Any.keys: Array get() = Object.keys(this)
/**
* Returns the own enumerable string-keyed property [key, value] pairs of this object as an array.
*/
public val Any.entries: Array> get() = Object.entries(this)