Skip to content

Commit fea59e4

Browse files
author
Ben Pham
committed
fix format
1 parent 38fc2da commit fea59e4

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class StaticServer {
2222
break;
2323
case 2:
2424
this.port = `${port}`;
25-
if (typeof (arguments[1]) === 'string') {
25+
if (typeof(arguments[1]) === 'string') {
2626
this.root = root;
2727
this.localOnly = false;
2828
this.keepAlive = false;
@@ -35,7 +35,7 @@ class StaticServer {
3535
}
3636
break;
3737
case 1:
38-
if (typeof (arguments[0]) === 'number') {
38+
if (typeof(arguments[0]) === 'number') {
3939
this.port = `${port}`;
4040
this.root = ROOT;
4141
this.localOnly = false;
@@ -64,7 +64,7 @@ class StaticServer {
6464
}
6565

6666
start() {
67-
if (this.running) {
67+
if( this.running ) {
6868
return Promise.resolve(this.origin);
6969
}
7070

ios/FPStaticServer.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@
66
#import "GCDWebServerFileResponse.h"
77
#import "GCDWebServerHTTPStatusCodes.h"
88

9-
@interface FPStaticServer : NSObject <RCTBridgeModule>
10-
{
9+
@interface FPStaticServer : NSObject <RCTBridgeModule> {
1110
GCDWebServer *_webServer;
1211
}
1312

14-
@property(nonatomic, retain) NSString *localPath;
15-
@property(nonatomic, retain) NSString *url;
13+
@property(nonatomic, retain) NSString *localPath;
14+
@property(nonatomic, retain) NSString *url;
1615

17-
@property(nonatomic, retain) NSString *www_root;
18-
@property(nonatomic, retain) NSNumber *port;
19-
@property(nonatomic, retain) NSDictionary<NSString *, NSString *> *mime_type_overrides;
20-
@property(assign) BOOL localhost_only;
21-
@property(assign) BOOL keep_alive;
16+
@property(nonatomic, retain) NSString *www_root;
17+
@property(nonatomic, retain) NSNumber *port;
18+
@property(nonatomic, retain) NSDictionary<NSString *, NSString *> *mime_type_overrides;
19+
@property(assign) BOOL localhost_only;
20+
@property(assign) BOOL keep_alive;
2221

2322
@end

ios/FPStaticServer.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ - (dispatch_queue_t)methodQueue
3030
}
3131

3232

33-
RCT_EXPORT_METHOD(start:(NSString *)port
33+
RCT_EXPORT_METHOD(start: (NSString *)port
3434
root:(NSString *)optroot
3535
localOnly:(BOOL *)localhost_only
3636
keepAlive:(BOOL *)keep_alive
@@ -107,7 +107,7 @@ - (dispatch_queue_t)methodQueue
107107
response = [GCDWebServerResponse responseWithStatusCode:kGCDWebServerHTTPStatusCode_NotFound];
108108
}
109109
} else if ([fileType isEqualToString:NSFileTypeRegular]) {
110-
if (allowRangeRequests) {
110+
if (allowRangeRequests) {
111111
response = [[GCDWebServerFileResponse alloc] initWithFile:filePath byteRange:request.byteRange isAttachment:NO mimeTypeOverrides:mime_type_overrides] ;
112112
[response setValue:@"bytes" forAdditionalHeader:@"Accept-Ranges"];
113113
} else {

0 commit comments

Comments
 (0)