Skip to content

Commit

Permalink
Merge pull request #42 from mcollina/remove-array
Browse files Browse the repository at this point in the history
Remove use(array) form
  • Loading branch information
mcollina authored Jan 9, 2018
2 parents 0be50b5 + 505563b commit 9675b6f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 64 deletions.
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.

0 comments on commit 9675b6f

Please sign in to comment.