Skip to content

Commit

Permalink
doc: use ASCII apostrophes consistently
Browse files Browse the repository at this point in the history
PR-URL: #43114
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
  • Loading branch information
tniessen authored and juanarbol committed May 31, 2022
1 parent c3ae514 commit 84b698d
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 66 deletions.
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Report security bugs in Node.js via [HackerOne](https://hackerone.com/nodejs).

Your report will be acknowledged within 5 days, and youll receive a more
Your report will be acknowledged within 5 days, and you'll receive a more
detailed response to your report within 10 days indicating the next steps in
handling your submission.

Expand Down Expand Up @@ -49,7 +49,7 @@ Here is the security disclosure policy for Node.js

* This process can take some time, especially when coordination is required
with maintainers of other projects. Every effort will be made to handle the
bug in as timely a manner as possible; however, its important that we follow
bug in as timely a manner as possible; however, it's important that we follow
the release process above to ensure that the disclosure is handled in a
consistent manner.

Expand Down
2 changes: 1 addition & 1 deletion doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ console.log(uint16array);
```

It is possible to create a new `Buffer` that shares the same allocated
memory as a [`TypedArray`][] instance by using the `TypedArray` objects
memory as a [`TypedArray`][] instance by using the `TypedArray` object's
`.buffer` property in the same way. [`Buffer.from()`][`Buffer.from(arrayBuf)`]
behaves like `new Uint8Array()` in this context.

Expand Down
4 changes: 2 additions & 2 deletions doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ added: v10.0.0

Try to construct a table with the columns of the properties of `tabularData`
(or use `properties`) and rows of `tabularData` and log it. Falls back to just
logging the argument if it cant be parsed as tabular.
logging the argument if it can't be parsed as tabular.

```js
// These can't be parsed as tabular data
Expand Down Expand Up @@ -459,7 +459,7 @@ changes:
description: The elapsed time is displayed with a suitable time unit.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/5901
description: This method no longer supports multiple calls that dont map
description: This method no longer supports multiple calls that don't map
to individual `console.time()` calls; see below for details.
-->

Expand Down
2 changes: 1 addition & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2574,7 +2574,7 @@ changes:
Type: Runtime

Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned
`Promise` instead, or a listener to the workers `'exit'` event.
`Promise` instead, or a listener to the worker's `'exit'` event.

### DEP0133: `http` `connection`

Expand Down
8 changes: 4 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ algorithm][]. All other specifier resolutions are always only resolved with
the standard relative [URL][] resolution semantics.

Like in CommonJS, module files within packages can be accessed by appending a
path to the package name unless the packages [`package.json`][] contains an
path to the package name unless the package's [`package.json`][] contains an
[`"exports"`][] field, in which case files within packages can only be accessed
via the paths defined in [`"exports"`][].

Expand Down Expand Up @@ -711,7 +711,7 @@ Hooks are part of a chain, even if that chain consists of only one custom
(user-provided) hook and the default hook, which is always present. Hook
functions nest: each one must always return a plain object, and chaining happens
as a result of each function calling `next<hookName>()`, which is a reference
to the subsequent loaders hook.
to the subsequent loader's hook.
A hook that returns a value lacking a required property triggers an exception.
A hook that returns without calling `next<hookName>()` _and_ without returning
Expand Down Expand Up @@ -981,7 +981,7 @@ export function globalPreload({ port }) {
### Examples
The various loader hooks can be used together to accomplish wide-ranging
customizations of Node.js code loading and evaluation behaviors.
customizations of the Node.js code loading and evaluation behaviors.
#### HTTPS loader
Expand Down Expand Up @@ -1058,7 +1058,7 @@ prints the current version of CoffeeScript per the module at the URL in

#### Transpiler loader

Sources that are in formats Node.js doesnt understand can be converted into
Sources that are in formats Node.js doesn't understand can be converted into
JavaScript using the [`load` hook][load hook]. Before that hook gets called,
however, a [`resolve` hook][resolve hook] needs to tell Node.js not to
throw an error on unknown file types.
Expand Down
4 changes: 2 additions & 2 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ stack trace for such warnings.

The emitted warning can be inspected with [`process.on('warning')`][] and will
have the additional `emitter`, `type`, and `count` properties, referring to
the event emitter instance, the events name and the number of attached
the event emitter instance, the event's name and the number of attached
listeners, respectively.
Its `name` property is set to `'MaxListenersExceededWarning'`.

Expand Down Expand Up @@ -1624,7 +1624,7 @@ added: v14.5.0
-->

* `event` {Event}
* Returns: {boolean} `true` if either events `cancelable` attribute value is
* Returns: {boolean} `true` if either event's `cancelable` attribute value is
false or its `preventDefault()` method was not invoked, otherwise `false`.

Dispatches the `event` to the list of handlers for `event.type`.
Expand Down
4 changes: 2 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2480,7 +2480,7 @@ The "not recommended" examples above check for existence and then use the
file; the "recommended" examples are better because they use the file directly
and handle the error, if any.
In general, check for the existence of a file only if the file wont be
In general, check for the existence of a file only if the file won't be
used directly, for example when its existence is a signal from another
process.
Expand Down Expand Up @@ -3810,7 +3810,7 @@ If the `target` does not exist, `'file'` will be used. Windows junction points
require the destination path to be absolute. When using `'junction'`, the
`target` argument will automatically be normalized to absolute path.

Relative targets are relative to the links parent directory.
Relative targets are relative to the link's parent directory.
```mjs
import { symlink } from 'node:fs';
Expand Down
32 changes: 16 additions & 16 deletions doc/api/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ in your project's `package.json`.

## Package entry points

In a packages `package.json` file, two fields can define entry points for a
In a package's `package.json` file, two fields can define entry points for a
package: [`"main"`][] and [`"exports"`][]. The [`"main"`][] field is supported
in all versions of Node.js, but its capabilities are limited: it only defines
the main entry point of the package.
Expand Down Expand Up @@ -255,7 +255,7 @@ likely be a breaking change.**

To make the introduction of [`"exports"`][] non-breaking, ensure that every
previously supported entry point is exported. It is best to explicitly specify
entry points so that the packages public API is well-defined. For example,
entry points so that the package's public API is well-defined. For example,
a project that previous exported `main`, `lib`,
`feature`, and the `package.json` could use the following `package.exports`:

Expand Down Expand Up @@ -303,7 +303,7 @@ path `import feature from 'my-mod/feature/index.js`.
### Main entry point export

To set the main entry point for a package, it is advisable to define both
[`"exports"`][] and [`"main"`][] in the packages [`package.json`][] file:
[`"exports"`][] and [`"main"`][] in the package's [`package.json`][] file:

```json
{
Expand Down Expand Up @@ -745,8 +745,8 @@ changes:
description: Unflag self-referencing a package using its name.
-->

Within a package, the values defined in the packages
`package.json` [`"exports"`][] field can be referenced via the packages name.
Within a package, the values defined in the package's
`package.json` [`"exports"`][] field can be referenced via the package's name.
For example, assuming the `package.json` is:

```json
Expand Down Expand Up @@ -950,7 +950,7 @@ This approach is appropriate for any of the following use cases:
install both this package and those other packages. For example a `utilities`
package is used directly in an application, and a `utilities-plus` package
adds a few more functions to `utilities`. Because the wrapper exports
underlying CommonJS files, it doesnt matter if `utilities-plus` is written in
underlying CommonJS files, it doesn't matter if `utilities-plus` is written in
CommonJS or ES module syntax; it will work either way.
* The package stores internal state, and the package author would prefer not to
refactor the package to isolate its state management. See the next section.
Expand All @@ -960,7 +960,7 @@ be to add an export, e.g. `"./module"`, to point to an all-ES module-syntax
version of the package. This could be used via `import 'pkg/module'` by users
who are certain that the CommonJS version will not be loaded anywhere in the
application, such as by dependencies; or if the CommonJS version can be loaded
but doesnt affect the ES module version (for example, because the package is
but doesn't affect the ES module version (for example, because the package is
stateless):

```json
Expand Down Expand Up @@ -994,22 +994,22 @@ points directly:

This can be done if both the CommonJS and ES module versions of the package are
equivalent, for example because one is the transpiled output of the other; and
the packages management of state is carefully isolated (or the package is
the package's management of state is carefully isolated (or the package is
stateless).

The reason that state is an issue is because both the CommonJS and ES module
versions of the package might get used within an application; for example, the
users application code could `import` the ES module version while a dependency
user's application code could `import` the ES module version while a dependency
`require`s the CommonJS version. If that were to occur, two copies of the
package would be loaded in memory and therefore two separate states would be
present. This would likely cause hard-to-troubleshoot bugs.

Aside from writing a stateless package (if JavaScripts `Math` were a package,
Aside from writing a stateless package (if JavaScript's `Math` were a package,
for example, it would be stateless as all of its methods are static), there are
some ways to isolate state so that its shared between the potentially loaded
some ways to isolate state so that it's shared between the potentially loaded
CommonJS and ES module instances of the package:

1. If possible, contain all state within an instantiated object. JavaScripts
1. If possible, contain all state within an instantiated object. JavaScript's
`Date`, for example, needs to be instantiated to contain state; if it were a
package, it would be used like this:

Expand All @@ -1019,7 +1019,7 @@ CommonJS and ES module instances of the package:
// someDate contains state; Date does not
```

The `new` keyword isnt required; a packages function can return a new
The `new` keyword isn't required; a package's function can return a new
object, or modify a passed-in object, to keep the state external to the
package.

Expand All @@ -1046,7 +1046,7 @@ CommonJS and ES module instances of the package:
each reference of `pkg` will contain the same state; and modifying that
state from either module system will apply to both.

Any plugins that attach to the packages singleton would need to separately
Any plugins that attach to the package's singleton would need to separately
attach to both the CommonJS and ES module singletons.

This approach is appropriate for any of the following use cases:
Expand Down Expand Up @@ -1121,7 +1121,7 @@ changes:
}
```

The `"name"` field defines your packages name. Publishing to the
The `"name"` field defines your package's name. Publishing to the
_npm_ registry requires a name that satisfies
[certain requirements](https://docs.npmjs.com/files/package.json#name).

Expand Down Expand Up @@ -1202,7 +1202,7 @@ Files ending with `.js` are loaded as ES modules when the nearest parent
`"module"`.

The nearest parent `package.json` is defined as the first `package.json` found
when searching in the current folder, that folders parent, and so on up
when searching in the current folder, that folder's parent, and so on up
until a node\_modules folder or the volume root is reached.

```json
Expand Down
4 changes: 2 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ added: v0.1.27
changes:
- version: v11.14.0
pr-url: https://github.com/nodejs/node/pull/26544
description: Worker threads will now use a copy of the parent threads
description: Worker threads will now use a copy of the parent thread's
`process.env` by default, configurable through the `env`
option of the `Worker` constructor.
- version: v10.0.0
Expand Down Expand Up @@ -1646,7 +1646,7 @@ console.log(env.test);
Unless explicitly specified when creating a [`Worker`][] instance,
each [`Worker`][] thread has its own copy of `process.env`, based on its
parent threads `process.env`, or whatever was specified as the `env` option
parent thread's `process.env`, or whatever was specified as the `env` option
to the [`Worker`][] constructor. Changes to `process.env` will not be visible
across [`Worker`][] threads, and only the main thread can make changes that
are visible to the operating system or to native add-ons.
Expand Down
2 changes: 1 addition & 1 deletion doc/api/synopsis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Commands in this document start with `$` or `>` to replicate how they would
appear in a user's terminal. Do not include the `$` and `>` characters. They are
there to show the start of each command.

Lines that dont start with `$` or `>` character show the output of the previous
Lines that don't start with `$` or `>` character show the output of the previous
command.

First, make sure to have downloaded and installed Node.js. See
Expand Down
2 changes: 1 addition & 1 deletion doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ added: v16.7.0
`URL.createObjectURL()`.

Removes the stored {Blob} identified by the given ID. Attempting to revoke a
ID that isnt registered will silently fail.
ID that isn't registered will silently fail.

### Class: `URLSearchParams`

Expand Down
4 changes: 2 additions & 2 deletions doc/api/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ For use inside of a custom [`serializer._writeHostObject()`][].

* `buffer` {Buffer|TypedArray|DataView}

Write raw bytes into the serializers internal buffer. The deserializer
Write raw bytes into the serializer's internal buffer. The deserializer
will require a way to compute the length of the buffer.
For use inside of a custom [`serializer._writeHostObject()`][].

Expand Down Expand Up @@ -558,7 +558,7 @@ For use inside of a custom [`deserializer._readHostObject()`][].
* `length` {integer}
* Returns: {Buffer}

Read raw bytes from the deserializers internal buffer. The `length` parameter
Read raw bytes from the deserializer's internal buffer. The `length` parameter
must correspond to the length of the buffer that was passed to
[`serializer.writeRawBytes()`][].
For use inside of a custom [`deserializer._readHostObject()`][].
Expand Down
8 changes: 4 additions & 4 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ changes:
Receive a single message from a given `MessagePort`. If no message is available,
`undefined` is returned, otherwise an object with a single `message` property
that contains the message payload, corresponding to the oldest message in the
`MessagePort`s queue.
`MessagePort`'s queue.

```js
const { MessageChannel, receiveMessageOnPort } = require('node:worker_threads');
Expand Down Expand Up @@ -332,7 +332,7 @@ added: v10.5.0
-->

An arbitrary JavaScript value that contains a clone of the data passed
to this threads `Worker` constructor.
to this thread's `Worker` constructor.

The data is cloned as if using [`postMessage()`][`port.postMessage()`],
according to the [HTML structured clone algorithm][].
Expand Down Expand Up @@ -929,7 +929,7 @@ changes:
description: The `resourceLimits` option was introduced.
-->

* `filename` {string|URL} The path to the Workers main script or module. Must
* `filename` {string|URL} The path to the Worker's main script or module. Must
be either an absolute path or a relative path (i.e. relative to the
current working directory) starting with `./` or `../`, or a WHATWG `URL`
object using `file:` or `data:` protocol.
Expand All @@ -945,7 +945,7 @@ changes:
* `env` {Object} If set, specifies the initial value of `process.env` inside
the Worker thread. As a special value, [`worker.SHARE_ENV`][] may be used
to specify that the parent thread and the child thread should share their
environment variables; in that case, changes to one threads `process.env`
environment variables; in that case, changes to one thread's `process.env`
object affect the other thread as well. **Default:** `process.env`.
* `eval` {boolean} If `true` and the first argument is a `string`, interpret
the first argument to the constructor as a script that is executed once the
Expand Down
4 changes: 2 additions & 2 deletions doc/api/zlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ speed, at the cost of memory usage.
There are equivalents to the zlib options for Brotli-based streams, although
these options have different ranges than the zlib ones:

* zlibs `level` option matches Brotlis `BROTLI_PARAM_QUALITY` option.
* zlibs `windowBits` option matches Brotlis `BROTLI_PARAM_LGWIN` option.
* zlib's `level` option matches Brotli's `BROTLI_PARAM_QUALITY` option.
* zlib's `windowBits` option matches Brotli's `BROTLI_PARAM_LGWIN` option.

See [below][Brotli parameters] for more details on Brotli-specific options.

Expand Down
6 changes: 3 additions & 3 deletions doc/contributing/cpp-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tools.

## Formatting

Unfortunately, the C++ linter (based on [Googles `cpplint`][]), which can be
Unfortunately, the C++ linter (based on [Google's `cpplint`][]), which can be
run explicitly via `make lint-cpp`, does not currently catch a lot of rules that
are specific to the Node.js C++ code base. This document explains the most
common of these rules:
Expand Down Expand Up @@ -117,7 +117,7 @@ void FunctionWithAVeryLongName(int parameter_with_a_very_long_name,
...);
```
If that doesnt work, break after the `(` and use 4 spaces of indentation:
If that doesn't work, break after the `(` and use 4 spaces of indentation:
```cpp
void FunctionWithAReallyReallyReallyLongNameSeriouslyStopIt(
Expand Down Expand Up @@ -397,7 +397,7 @@ even `try` and `catch` **will** break.
[ES.48]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-casts
[ES.49]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-casts-named
[Google C++ Style Guide]: https://google.github.io/styleguide/cppguide.html
[Googles `cpplint`]: https://github.com/google/styleguide
[Google's `cpplint`]: https://github.com/google/styleguide
[R.20]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-owner
[R.21]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-unique
[Run Time Type Information]: https://en.wikipedia.org/wiki/Run-time_type_information
Expand Down
4 changes: 2 additions & 2 deletions doc/contributing/maintaining-icu.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ Floating patches are applied at `configure` time. The "patch" files
are used instead of the original source files. The patch files are
complete `.cpp` files replacing the original contents.

Patches are tied to a specific ICU version. They wont apply to a
Patches are tied to a specific ICU version. They won't apply to a
future ICU version. We assume that you filed a bug against [ICU][] and
upstreamed the fix, so the patch wont be needed in a later ICU
upstreamed the fix, so the patch won't be needed in a later ICU
version.

### Example
Expand Down
Loading

0 comments on commit 84b698d

Please sign in to comment.