diff --git a/lib/utils.js b/lib/utils.js index 0434d7f..ad89a51 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,10 +1,9 @@ 'use strict'; +const { types } = require('util'); const crypto = require('crypto'); const url = require('url'); const formatDate = require('dateformat'); -const isNumber = require('is-number'); -const isString = require('is-string'); const longDateRegExp = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/; @@ -119,7 +118,7 @@ class Utils { } static isValidHeaderValue(value) { - return isNumber(value) || isString(value); + return typeof value === 'number' || typeof value === 'string' || types.isStringObject(value); } static parseUrl(urlToParse, parseQueryString, slashesDenoteHost) { diff --git a/package.json b/package.json index cabfe47..c5fedf1 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,6 @@ "tape": "^4.17.0" }, "dependencies": { - "dateformat": "4.6.3", - "is-number": "7.0.0", - "is-string": "1.0.7" + "dateformat": "4.6.3" } }