Skip to content

Commit 45c6c17

Browse files
committed
Integrate proofreading for Chapter 10
1 parent 6adccdc commit 45c6c17

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

10_modules.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ with at the time and forget to also fix it in the other program.
118118

119119
(((duplication)))Once you have lots of such shared, duplicated pieces
120120
of code, you will find yourself wasting a lot of time and energy on
121-
moving them around and keeping them up to date.
121+
moving them around and keeping them up-to-date.
122122

123123
(((reuse)))Putting pieces of functionality that stand on their own
124124
into separate files and modules makes them easier to track, update,
@@ -481,11 +481,11 @@ global variable (`require`) to allow modules to find and use each
481481
other without going through the ((global scope)).
482482

483483
This style of module system is called _((CommonJS)) modules_, after
484-
the pseudo((standard)) that first specified it. It is built into the
484+
the pseudo-((standard)) that first specified it. It is built into the
485485
((Node.js)) system. Real implementations do a lot more than the
486486
example I showed. Most importantly, they have a much more intelligent
487487
way of going from a module name to an actual piece of code, allowing
488-
both path names relative to the current file and module names that
488+
both pathnames relative to the current file and module names that
489489
point directly to locally installed modules.
490490

491491
[[amd]]
@@ -663,7 +663,7 @@ code executes.
663663

664664
A real ((AMD)) implementation is, again, quite a lot more clever about
665665
resolving module names to actual URLs and generally more robust than
666-
the one shown previously. The _((RequireJS))_ (_requirejs.org_) project provides
666+
the one shown previously. The _((RequireJS))_ (http://requirejs.org[_requirejs.org_]) project provides
667667
a popular implementation of this style of ((module loader)).
668668

669669
== Interface design ==
@@ -716,7 +716,7 @@ expects a real array won't be able to work with them. This is an
716716
example of poor __composability__—the module cannot be easily composed
717717
with other code.
718718

719-
(((encapsulation)))(((spell-check example)))An example would be a
719+
(((encapsulation)))(((spell-check example)))One example would be a
720720
module for spell-checking text, which we might need when we want to
721721
write a text editor. The spell-checker could be made to operate
722722
directly on whichever complicated ((data structure))s the editor uses
@@ -840,7 +840,7 @@ Tiger
840840
(((book analogy)))Don't exaggerate and create too many modules. A book
841841
that starts a new chapter for every page would probably get on your
842842
nerves, if only because of all the space wasted on titles. Similarly,
843-
having to open ten files to read a tiny project isn't helpful. Aim for
843+
having to open 10 files to read a tiny project isn't helpful. Aim for
844844
three to five modules.
845845

846846
(((encapsulation)))You can choose to have some functions become

20_node.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ response's `end` method.
709709
(((path,URL)))(((urlToPath function)))(((url module)))(((parsing)))(((escaping,in
710710
URLs)))(((decodeURIComponent function)))To get a path from the
711711
((URL)) in the request, the `urlToPath` function uses Node's built-in
712-
`"url"` module to parse the URL. It takes its path name, which will be
712+
`"url"` module to parse the URL. It takes its pathname, which will be
713713
something like `/file.txt`, decodes that to get rid of the `%20`-style
714714
escape codes, and prefixes a single dot to produce a path relative to
715715
the current directory.

0 commit comments

Comments
 (0)