File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 3
3
// PushAdapter, it uses GCM for android push, APNS for ios push.
4
4
// WEB for web push.
5
5
import log from 'npmlog' ;
6
+ import { booleanParser } from './utils.js' ;
6
7
7
- /* istanbul ignore if */
8
- if ( process . env . VERBOSE || process . env . VERBOSE_PARSE_SERVER_PUSH_ADAPTER ) {
8
+ /* c8 ignore start */
9
+ if ( booleanParser ( process . env . VERBOSE || process . env . VERBOSE_PARSE_SERVER_PUSH_ADAPTER ) ) {
9
10
log . level = 'verbose' ;
10
11
}
12
+ /* c8 ignore stop */
11
13
12
14
import ParsePushAdapter from './ParsePushAdapter.js' ;
13
15
import GCM from './GCM.js' ;
Original file line number Diff line number Diff line change
1
+ function booleanParser ( opt ) {
2
+ if ( opt == true || opt == 'true' || opt == '1' ) {
3
+ return true ;
4
+ }
5
+ return false ;
6
+ }
7
+
8
+ export {
9
+ booleanParser ,
10
+ }
You can’t perform that action at this time.
0 commit comments