Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed May 8, 2021
1 parent 27369d2 commit b23bb5b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions boa/src/builtins/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,17 @@ impl Object {
Ok(object.has_own_property(key).into())
}

/// `Object.prototype.propertyIsEnumerable( property )`
///
/// This method returns a Boolean indicating whether the specified property is
/// enumerable and is the object's own property.
///
/// More information:
/// - [ECMAScript reference][spec]
/// - [MDN documentation][mdn]
///
/// [spec]: https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
/// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable
pub fn property_is_enumerable(
this: &Value,
args: &[Value],
Expand All @@ -483,6 +494,17 @@ impl Object {
}))
}

/// `Object.assign( target, ...sources )`
///
/// This method copies all enumerable own properties from one or more
/// source objects to a target object. It returns the target object.
///
/// More information:
/// - [ECMAScript reference][spec]
/// - [MDN documentation][mdn]
///
/// [spec]: https://tc39.es/ecma262/#sec-object.assign
/// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
pub fn assign(_: &Value, args: &[Value], context: &mut Context) -> Result<Value> {
let mut to = args
.get(0)
Expand Down

0 comments on commit b23bb5b

Please sign in to comment.