fn is_concat_spreadable(this: &Value, context: &mut Context) -> Result<bool> {
        // 1. If Type(O) is not Object, return false.
        if !this.is_object() {
            return Ok(false);
        }
        // 2. Let spreadable be ? Get(O, @@isConcatSpreadable).
        let spreadable = this.get_field(WellKnownSymbols::is_concat_spreadable(), context)?;

        // 3. If spreadable is not undefined, return ! ToBoolean(spreadable).
        if !spreadable.is_undefined() {
            return Ok(spreadable.to_boolean());
        }
        // 4. Return ? IsArray(O).
        match this.as_object() {
            Some(obj) => Ok(obj.is_array()),
            _ => Ok(false),
        }
    }
/// Utility function for concatenating array objects.
///
/// Returns a Boolean valued property that if `true` indicates that
/// an object should be flattened to its array elements
/// by `Array.prototype.concat`.
Utility function for concatenating array objects.
Returns a Boolean valued property that if `true` indicates that
an object should be flattened to its array elements
by `Array.prototype.concat`.
Utility function for concatenating array objects . Returns a Boolean valued property that if ` true ` indicates that an object should be flattened to its array elements by ` Array . prototype . concat ` .
fn is_concat_spreadable(this: &Value, context: &mut Context) -> Result<bool> {
        // 1. If Type(O) is not Object, return false.
        if !this.is_object() {
            return Ok(false);
        }
        // 2. Let spreadable be ? Get(O, @@isConcatSpreadable).
        let spreadable = this.get_field(WellKnownSymbols::is_concat_spreadable(), context)?;
        // 3. If spreadable is not undefined, return ! ToBoolean(spreadable).
        if !spreadable.is_undefined() {
            return Ok(spreadable.to_boolean());
        }
        // 4. Return ? IsArray(O).
        match this.as_object() {
            Some(obj) => Ok(obj.is_array()),
            _ => Ok(false),
        }
    }
fn is_concat_spreadable ( this : & Value , context : & mut Context ) -> Result < bool > { // 1. If Type(O) is not Object, return false. if ! this . is_object ( ) { return Ok ( false ) ; } // 2. Let spreadable be ? Get(O, @@isConcatSpreadable). let spreadable = this . get_field ( WellKnownSymbols :: is_concat_spreadable ( ) , context ) ? ; // 3. If spreadable is not undefined, return ! ToBoolean(spreadable). if ! spreadable . is_undefined ( ) { return Ok ( spreadable . to_boolean ( ) ) ; } // 4. Return ? IsArray(O). match this . as_object ( ) { Some ( obj ) => Ok ( obj . is_array ( ) ) , _ => Ok ( false ) , } }
Utility function for concatenating array objects.
Utility function for concatenating array objects .
this
&Value
context
&mut Context
this
&Value
context
&mut Context