Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant dependencies #26

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -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$/;

Expand Down Expand Up @@ -119,7 +118,7 @@ class Utils {
}

static isValidHeaderValue(value) {
return isNumber(value) || isString(value);
return typeof value === 'number' || typeof value === 'string' || types.isStringObject(value);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

static parseUrl(urlToParse, parseQueryString, slashesDenoteHost) {
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}