Skip to content

Commit

Permalink
docs: replace arrow with classical function because of this
Browse files Browse the repository at this point in the history
  • Loading branch information
iamandrewluca authored Jul 16, 2024
1 parent d34fbb8 commit 0e7a309
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import { Traverse } from 'neotraverse/modern';

const obj = { a: 1, b: 2, c: [3, 4] };

new Traverse(obj).forEach((ctx, x) => {
new Traverse(obj).forEach(function (ctx, x) {
if (x < 0) ctx.update(x + 128); // `this` is `ctx` in modern build
});
```
Expand Down

0 comments on commit 0e7a309

Please sign in to comment.