lib/request: fix DEBUG env var switch 🐛

This commit is contained in:
Jannis R 2021-02-17 18:33:18 +01:00
parent ae66568c03
commit ebe7c59524
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -1,7 +1,7 @@
'use strict' 'use strict'
const DEV = process.env.NODE_ENV === 'dev' const DEV = process.env.NODE_ENV === 'dev'
const DEBUG = /\bhafas-client\b/.test(process.env.DEBUG || '') const DEBUG = /(^|,)hafas-client(,|$)/.test(process.env.DEBUG || '')
const ProxyAgent = require('https-proxy-agent') const ProxyAgent = require('https-proxy-agent')
const {isIP} = require('net') const {isIP} = require('net')