content-type
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,6 @@ | ||
1.0.1 / 2015-02-13 | ||
================== | ||
* Improve missing `Content-Type` header error message | ||
1.0.0 / 2015-02-01 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -109,5 +109,9 @@ /*! | ||
// support req/res-like objects as argument | ||
if (typeof string === 'object') { | ||
// support req/res-like objects as argument | ||
string = getcontenttype(string) | ||
if (typeof string !== 'string') { | ||
throw new TypeError('content-type header is missing from object'); | ||
} | ||
} | ||
@@ -114,0 +118,0 @@ |
{ | ||
"name": "content-type", | ||
"description": "Create and parse HTTP Content-Type header", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -38,2 +38,4 @@ # content-type | ||
Throws a `TypeError` if the string is missing or invalid. | ||
### contentType.parse(req) | ||
@@ -48,2 +50,4 @@ | ||
Throws a `TypeError` if the `Content-Type` header is missing or invalid. | ||
### contentType.parse(res) | ||
@@ -58,2 +62,4 @@ | ||
Throws a `TypeError` if the `Content-Type` header is missing or invalid. | ||
### contentType.format(obj) | ||
@@ -74,2 +80,4 @@ | ||
Throws a `TypeError` if the object contains an invalid type or parameter names. | ||
## License | ||
@@ -76,0 +84,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9592
174
93
0