Skip to content

Commit f8cfa50

Browse files
committed
Fix typos
1 parent 7870a40 commit f8cfa50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interfaceWrapper/en/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ how wrapper works for `setTimeout`.
1919
## Tasks
2020

2121
1. Learn how `setTimeout` is wrapped in example: `framework.js`. Now we will
22-
try to wrap module fs. We can iterat all of its functions by following code:
22+
try to wrap module fs. We can iterate all of its functions by following code:
2323
`for (var key in fs) {...}` and replace its function with wrapped ones. We need
2424
a closure function and it should be universal to wrap any function in fs
2525
interface. The purpose of this example wrapper is to log all calls to the file
@@ -39,11 +39,11 @@ following code:
3939
```
4040
This example contains a call to `fs.readFile`. In next steps we will change the
4141
behavior of the code changing `framework.js` and wrapping all `fs` functions.
42-
Let`s run `node framework` and make sure that it reads th file displays its
42+
Let's run `node framework` and make sure that it reads the file and displays its
4343
length.
4444
3. Next step is preparing function `cloneInterface(interfaceName)` for cloning
4545
all keys from given library into new interface. So we can pass its result
46-
(cloned `fs`) to sandbox instead of `fs`. Clonning function example:
46+
(cloned `fs`) to sandbox instead of `fs`. Cloning function example:
4747

4848
```JavaScript
4949
function cloneInterface(anInterface) {
@@ -55,7 +55,7 @@ all keys from given library into new interface. So we can pass its result
5555
}
5656
```
5757
4. After that we can add wrapper `wrapFunction(fnName, fn)` with 2 arguments:
58-
name of the function and link to a function itself. It returns `wrapper` -
58+
name of the function and link to a function itself. It returns `wrapper`
5959
closure function. Closure `wrapper` is a newly created function with the help
6060
of functional inheritance, so it will see `fnName`, `fn` in its context. Thus
6161
we can pass all arguments from wrapper into original function as you see in

0 commit comments

Comments
 (0)