Skip to content

Commit 464b04a

Browse files
authored
docs(readme): spelling and grammar fixes (#436)
Signed-off-by: Frazer Smith <[email protected]>
1 parent 7397616 commit 464b04a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Autoload can be customized using the following options:
9292
9393
- `dir` (required) - Base directory containing plugins to be loaded
9494
95-
Each script file within a directory is treated as a plugin unless the directory contains an index file (e.g. `index.js`). In that case only the index file (and the potential sub-directories) will be loaded.
95+
Each script file within a directory is treated as a plugin unless the directory contains an index file (e.g. `index.js`). In which case, only the index file (and the potential sub-directories) will be loaded.
9696
9797
The following script types are supported:
9898
@@ -123,7 +123,7 @@ Autoload can be customized using the following options:
123123
})
124124
```
125125
126-
- `matchFilter` (optional) - Filter matching any path that should be loaded. Can be a RegExp, a string or a function returning a boolean.
126+
- `matchFilter` (optional) - Filter matching any path that should be loaded. Can be a RegExp, a string, or a function returning a boolean.
127127
128128
```js
129129
fastify.register(autoLoad, {
@@ -133,7 +133,7 @@ Autoload can be customized using the following options:
133133
```
134134
135135
136-
- `ignoreFilter` (optional) - Filter matching any path that should not be loaded. Can be a RegExp, a string or a function returning a boolean.
136+
- `ignoreFilter` (optional) - Filter matching any path that should not be loaded. Can be a RegExp, a string ,or a function returning a boolean.
137137
138138
```js
139139
fastify.register(autoLoad, {
@@ -155,7 +155,7 @@ Autoload can be customized using the following options:
155155
156156
- `scriptPattern` (optional) - Regex to override the script files accepted by default. You should only use this option
157157
with a [customization hooks](https://nodejs.org/docs/latest/api/module.html#customization-hooks)
158-
provider, such as `ts-node`. Otherwise, widening the acceptance extension here will result in error.
158+
provider, such as `ts-node`. Otherwise, widening the acceptance extension here will result in an error.
159159
160160
161161
```js
@@ -496,11 +496,11 @@ Each plugin can be individually configured using the following module properties
496496
497497
## Autohooks:
498498
499-
The autohooks functionality provides several options for automatically embedding hooks, decorators, etc. to your routes. CJS and ESM `autohook` formats are supported.
499+
The autohooks functionality provides several options for automatically adding hooks, decorators, etc. to your routes. CJS and ESM `autohook` formats are supported.
500500
501-
The default behavior of `autoHooks: true` is to encapsulate the `autohooks.js` plugin with the contents of the folder containing the file. The `cascadeHooks: true` option encapsulates the hooks with the current folder contents and all subsequent children, with any additional `autohooks.js` files being applied cumulatively. The `overwriteHooks: true` option will re-start the cascade any time an `autohooks.js` file is encountered.
501+
The default behavior of `autoHooks: true` is to encapsulate the `autohooks.js` plugin with the contents of the folder containing the file. The `cascadeHooks: true` option encapsulates the hooks with the current folder contents and all subsequent children, with any additional `autohooks.js` files being applied cumulatively. The `overwriteHooks: true` option will restart the cascade any time an `autohooks.js` file is encountered.
502502
503-
Plugins and hooks are encapsulated together by folder and registered on the `fastify` instance which loaded the `@fastify/autoload` plugin. For more information on how encapsulation works in Fastify, see: https://fastify.dev/docs/latest/Reference/Encapsulation/#encapsulation
503+
Plugins and hooks are encapsulated together by folder and registered on the `fastify` instance that loaded the `@fastify/autoload` plugin. For more information on how encapsulation works in Fastify, see: https://fastify.dev/docs/latest/Reference/Encapsulation/#encapsulation
504504
505505
### Example:
506506

0 commit comments

Comments
 (0)