@@ -9,12 +9,10 @@ const REQUEST = require('./lib/request');
9
9
const RESPONSE = require ( './lib/response' ) ;
10
10
const UTILS = require ( './lib/utils' ) ;
11
11
const LOGGER = require ( './lib/logger' ) ;
12
+ const S3 = ( ) => require ( './lib/s3-service' ) ;
12
13
const { ResponseError, ConfigurationError } = require ( './lib/errors' ) ;
13
14
const prettyPrint = require ( './lib/prettyPrint' ) ;
14
15
15
- // Lazy load AWS S3 service
16
- const S3 = ( ) => require ( './lib/s3-service' ) ;
17
-
18
16
class API {
19
17
constructor ( props ) {
20
18
this . _version = props && props . version ? props . version : 'v1' ;
@@ -44,8 +42,8 @@ class API {
44
42
: { } ;
45
43
this . _compression =
46
44
props &&
47
- ( typeof props . compression === 'boolean' ||
48
- Array . isArray ( props . compression ) )
45
+ ( typeof props . compression === 'boolean' ||
46
+ Array . isArray ( props . compression ) )
49
47
? props . compression
50
48
: false ;
51
49
@@ -86,7 +84,7 @@ class API {
86
84
this . _app = { } ;
87
85
88
86
// Executed after the callback
89
- this . _finally = ( ) => { } ;
87
+ this . _finally = ( ) => { } ;
90
88
91
89
// Global error status (used for response parsing errors)
92
90
this . _errorStatus = 500 ;
@@ -215,8 +213,8 @@ class API {
215
213
stack : _stack [ 'm' ] [ method ]
216
214
? _stack [ 'm' ] [ method ] . concat ( stack )
217
215
: _stack [ '*' ] [ method ]
218
- ? _stack [ '*' ] [ method ] . concat ( stack )
219
- : stack ,
216
+ ? _stack [ '*' ] [ method ] . concat ( stack )
217
+ : stack ,
220
218
// inherited: _stack[method] ? _stack[method] : [],
221
219
route : '/' + parsedPath . join ( '/' ) ,
222
220
path : '/' + this . _prefix . concat ( parsedPath ) . join ( '/' ) ,
@@ -456,8 +454,8 @@ class API {
456
454
typeof args [ 0 ] === 'string'
457
455
? Array . of ( args . shift ( ) )
458
456
: Array . isArray ( args [ 0 ] )
459
- ? args . shift ( )
460
- : [ '/*' ] ;
457
+ ? args . shift ( )
458
+ : [ '/*' ] ;
461
459
462
460
// Init middleware stack
463
461
let middleware = [ ] ;
0 commit comments