mizchi/js/builtins/object does not have a README file

    Object

    #external
    pub type Object

    JavaScript Object

    Object::assign

    JS: Object.assign(target, source)

    Object::create

    JS: Object.create(v)

    Object::defineProperties

    JS: Object.defineProperties(obj, props) Defines new or modifies existing properties directly on an object https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties

    Object::defineProperty

    fn Object::defineProperty(obj :
    Any
    , prop : String, value? :
    Any
    , writable? : Bool, enumerable? : Bool, configurable? : Bool, get? : () ->
    Any
    , set? : (
    Any
    ) -> Unit) ->
    Any

    JS: Object.defineProperty(obj, prop, descriptor) Defines a new property directly on an object, or modifies an existing property https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty

    Object::entries

    JS: Object.entries(v)

    Returns an array of a given object's own enumerable property [key, value] pairs. Note: The returned array is a snapshot and should be treated as immutable.

    Object::freeze

    JS: Object.freeze(obj) Freezes an object, preventing new properties from being added and existing properties from being removed or changed

    Object::getOwnPropertyDescriptor

    fn Object::getOwnPropertyDescriptor(obj :
    Any
    , prop : String) -> PropertyDescriptor?

    JS: Object.getOwnPropertyDescriptor(obj, prop) Returns a property descriptor for an own property https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor

    Object::getOwnPropertyDescriptors

    fn Object::getOwnPropertyDescriptors(obj :
    Any
    ) ->
    Any

    JS: Object.getOwnPropertyDescriptors(obj) Returns all own property descriptors of an object https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors

    Object::getOwnPropertyNames

    fn Object::getOwnPropertyNames(obj :
    Any
    ) -> Array[String]

    JS: Object.getOwnPropertyNames(obj) Returns an array of all own property names (including non-enumerable) https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames

    Object::getOwnPropertySymbols

    JS: Object.getOwnPropertySymbols(obj) Returns an array of all own symbol properties https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertySymbols

    Object::groupBy

    fn[T] Object::groupBy(items : Array[T], callback : (T, Int) -> String) ->
    Any

    JS: Object.groupBy(items, callbackFn) Groups the elements of an iterable according to the string values returned by a callback function https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/groupBy

    Object::hasOwnProperty

    fn Object::hasOwnProperty(self : Object, key : String) -> Bool

    Object::isExtensible

    fn Object::isExtensible(self : Object) -> Bool

    JS: Object.isExtensible(obj) Instance method that calls the static Object.isExtensible

    Object::isExtensible_static

    fn Object::isExtensible_static(obj :
    Any
    ) -> Bool

    JS: Object.isExtensible(obj) Determines if an object is extensible

    Object::isFrozen

    fn Object::isFrozen(obj :
    Any
    ) -> Bool

    JS: Object.isFrozen(obj) Determines if an object is frozen

    Object::isPrototypeOf

    fn Object::isPrototypeOf(self : Object, target :
    Any
    ) -> Bool

    JS: object.isPrototypeOf(target)

    Object::isSealed

    fn Object::isSealed(obj :
    Any
    ) -> Bool

    JS: Object.isSealed(obj) Determines if an object is sealed

    Object::is_

    JS: Object.is(a, b) Determines whether two values are the same value

    Object::keys

    fn Object::keys(v :
    Any
    ) -> Array[String]

    JS: Object.keys(v)

    Returns an array of a given object's own enumerable property names. Note: The returned array is a snapshot and should be treated as immutable.

    Object::new

    JS: new Object() Returns Any directly - use from_map() for creating objects with initial properties Example: let obj = @js.from_map({ "key": @core.any(value) }) for typed object creation

    Object::preventExtensions

    fn Object::preventExtensions(obj :
    Any
    ) ->
    Any

    JS: Object.preventExtensions(obj) Prevents new properties from being added to an object

    Object::propertyIsEnumerable

    fn Object::propertyIsEnumerable(self : Object, key : String) -> Bool

    JS: object.propertyIsEnumerable(k)

    Object::seal

    JS: Object.seal(obj) Seals an object, preventing new properties from being added and marking all existing properties as non-configurable

    Object::to_any

    fn Object::to_any(self : Object) ->
    Any

    Object::to_string

    fn Object::to_string(self : Object) -> String

    Object::values

    JS: Object.values(v)

    Returns an array of a given object's own enumerable property values. Note: The returned array is a snapshot and should be treated as immutable.

    PropertyDescriptor

    pub(all) struct PropertyDescriptor {
    value :
    Any
    ?
    writable : Bool?
    enumerable : Bool?
    configurable : Bool?
    get : () ->
    Any
    ?
    set : (
    Any
    ) -> Unit?
    }

    Property descriptor returned by Object.getOwnPropertyDescriptor https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty

    Source Files