You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Autoload can be customized using the following options:
92
92
93
93
- `dir` (required) - Base directory containing plugins to be loaded
94
94
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.
96
96
97
97
The following script types are supported:
98
98
@@ -123,7 +123,7 @@ Autoload can be customized using the following options:
123
123
})
124
124
```
125
125
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.
127
127
128
128
```js
129
129
fastify.register(autoLoad, {
@@ -133,7 +133,7 @@ Autoload can be customized using the following options:
133
133
```
134
134
135
135
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.
137
137
138
138
```js
139
139
fastify.register(autoLoad, {
@@ -155,7 +155,7 @@ Autoload can be customized using the following options:
155
155
156
156
- `scriptPattern` (optional) - Regex to override the script files accepted by default. You should only use this option
157
157
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.
159
159
160
160
161
161
```js
@@ -496,11 +496,11 @@ Each plugin can be individually configured using the following module properties
496
496
497
497
## Autohooks:
498
498
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.
500
500
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.
502
502
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
0 commit comments