Skip to content

Commit 6c3ce12

Browse files
committed
.
1 parent 1782587 commit 6c3ce12

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

index.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ const REQUEST = require('./lib/request');
99
const RESPONSE = require('./lib/response');
1010
const UTILS = require('./lib/utils');
1111
const LOGGER = require('./lib/logger');
12+
const S3 = () => require('./lib/s3-service');
1213
const { ResponseError, ConfigurationError } = require('./lib/errors');
1314
const prettyPrint = require('./lib/prettyPrint');
1415

15-
// Lazy load AWS S3 service
16-
const S3 = () => require('./lib/s3-service');
17-
1816
class API {
1917
constructor(props) {
2018
this._version = props && props.version ? props.version : 'v1';
@@ -44,8 +42,8 @@ class API {
4442
: {};
4543
this._compression =
4644
props &&
47-
(typeof props.compression === 'boolean' ||
48-
Array.isArray(props.compression))
45+
(typeof props.compression === 'boolean' ||
46+
Array.isArray(props.compression))
4947
? props.compression
5048
: false;
5149

@@ -86,7 +84,7 @@ class API {
8684
this._app = {};
8785

8886
// Executed after the callback
89-
this._finally = () => {};
87+
this._finally = () => { };
9088

9189
// Global error status (used for response parsing errors)
9290
this._errorStatus = 500;
@@ -215,8 +213,8 @@ class API {
215213
stack: _stack['m'][method]
216214
? _stack['m'][method].concat(stack)
217215
: _stack['*'][method]
218-
? _stack['*'][method].concat(stack)
219-
: stack,
216+
? _stack['*'][method].concat(stack)
217+
: stack,
220218
// inherited: _stack[method] ? _stack[method] : [],
221219
route: '/' + parsedPath.join('/'),
222220
path: '/' + this._prefix.concat(parsedPath).join('/'),
@@ -456,8 +454,8 @@ class API {
456454
typeof args[0] === 'string'
457455
? Array.of(args.shift())
458456
: Array.isArray(args[0])
459-
? args.shift()
460-
: ['/*'];
457+
? args.shift()
458+
: ['/*'];
461459

462460
// Init middleware stack
463461
let middleware = [];

0 commit comments

Comments
 (0)