Skip to content

Commit ee5a829

Browse files
committed
Small tweaks from No Starch's proofreading
1 parent ecde031 commit ee5a829

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

08_error.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,11 +934,11 @@ console.log(box.locked);
934934
// → true
935935
```
936936

937+
if}}
938+
937939
For extra points, make sure that if you call `withBoxUnlocked` when
938940
the box is already unlocked, the box stays unlocked.
939941

940-
if}}
941-
942942
{{hint
943943

944944
{{index "locked box (exercise)", "finally keyword", "try keyword"}}

09_regexp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,8 +1043,8 @@ holding the section's settings.
10431043
{{index "carriage return", "line break", "newline character"}}
10441044

10451045
Since the format has to be processed ((line)) by line, splitting up
1046-
the file into separate lines is a good start. We used
1047-
`string.split("\n")` to do this in [Chapter ?](data#split).
1046+
the file into separate lines is a good start. We saw
1047+
the `split` method in [Chapter ?](data#split).
10481048
Some operating systems, however, use not just a newline character to
10491049
separate lines but a carriage return character followed by a newline
10501050
(`"\r\n"`). Given that the `split` method also allows a regular

10_modules.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,12 @@ scenario where the file's content comes from some other source.
599599

600600
Relatedly, stateful objects are sometimes useful or even necessary,
601601
but if something can be done with a function, use a function. Several
602-
of the INI file readers on NPM provide an interface style that require
603-
you to first create an object, then load the file into your object,
604-
and finally use specialized methods to get at the results. This type
605-
of thing is common in the object-oriented tradition, and it's
606-
terrible. Instead of making a single function call and moving on, you
607-
have to perform the ritual of moving your object through various
602+
of the INI file readers on NPM provide an interface style that
603+
requires you to first create an object, then load the file into your
604+
object, and finally use specialized methods to get at the results.
605+
This type of thing is common in the object-oriented tradition, and
606+
it's terrible. Instead of making a single function call and moving on,
607+
you have to perform the ritual of moving your object through various
608608
states. And because the data is now wrapped in a specialized object
609609
type, all code that interacts with it has to know about that type,
610610
creating unnecessary interdependencies.

0 commit comments

Comments
 (0)