Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use(array) form #42

Merged
merged 2 commits into from
Jan 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,6 @@ app.use(plugin)

`use` returns the instance on which `use` is called, to support a chainable API.

If you need to add more than a function and you don't need to use a different options object or callback, you can pass an array of functions to `.use`.
```js
app.use([first, second, third], opts)
```
The functions will be loaded in the same order as they are inside the array.

<a name="error-handling"></a>
#### Error handling

Expand Down
4 changes: 0 additions & 4 deletions boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ Boot.prototype.override = function (server, func, opts) {
Boot.prototype.use = function (plugin, opts) {
if (typeof plugin === 'function') {
this._addPlugin(plugin, opts)
} else if (Array.isArray(plugin)) {
for (var i = 0; i < plugin.length; i++) {
this._addPlugin(plugin[i], opts)
}
} else {
throw new Error('plugin must be a function')
}
Expand Down
54 changes: 0 additions & 54 deletions test/use-array.test.js

This file was deleted.