Skip to content

Commit

Permalink
rename foreach to for_each
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Ceccato authored and Angelo Ceccato committed Feb 24, 2024
1 parent d7285a8 commit be8401e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/engine/src/builtins/typed_array/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl IntrinsicObject for BuiltinTypedArray {
.method(Self::find_index, js_string!("findIndex"), 1)
.method(Self::find_last, js_string!("findLast"), 1)
.method(Self::find_last_index, js_string!("findLastIndex"), 1)
.method(Self::foreach, js_string!("forEach"), 1)
.method(Self::for_each, js_string!("forEach"), 1)
.method(Self::includes, js_string!("includes"), 1)
.method(Self::index_of, js_string!("indexOf"), 1)
.method(Self::join, js_string!("join"), 1)
Expand Down Expand Up @@ -998,7 +998,7 @@ impl BuiltinTypedArray {
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
pub(crate) fn foreach(
pub(crate) fn for_each(
this: &JsValue,
args: &[JsValue],
context: &mut Context,
Expand Down
2 changes: 1 addition & 1 deletion core/engine/src/object/builtins/jstypedarray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ impl JsTypedArray {
this_arg: Option<JsValue>,
context: &mut Context,
) -> JsResult<JsValue> {
BuiltinTypedArray::foreach(
BuiltinTypedArray::for_each(
&self.inner.clone().into(),
&[callback.into(), this_arg.into_or_undefined()],
context,
Expand Down

0 comments on commit be8401e

Please sign in to comment.