We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
VERBOSE
VERBOSE_PARSE_SERVER_PUSH_ADAPTER
1 parent 032cd76 commit 0f31300Copy full SHA for 0f31300
src/index.js
@@ -3,11 +3,13 @@
3
// PushAdapter, it uses GCM for android push, APNS for ios push.
4
// WEB for web push.
5
import log from 'npmlog';
6
+import { booleanParser } from './utils.js';
7
-/* istanbul ignore if */
8
-if (process.env.VERBOSE || process.env.VERBOSE_PARSE_SERVER_PUSH_ADAPTER) {
+/* c8 ignore start */
9
+if (booleanParser(process.env.VERBOSE || process.env.VERBOSE_PARSE_SERVER_PUSH_ADAPTER)) {
10
log.level = 'verbose';
11
}
12
+/* c8 ignore stop */
13
14
import ParsePushAdapter from './ParsePushAdapter.js';
15
import GCM from './GCM.js';
src/utils.js
@@ -0,0 +1,10 @@
1
+function booleanParser(opt) {
2
+ if (opt == true || opt == 'true' || opt == '1') {
+ return true;
+ }
+ return false;
+}
+
+export {
+ booleanParser,
0 commit comments