Comparing version 0.0.1 to 0.0.2
@@ -9,3 +9,3 @@ /** | ||
var csv = require("binary-csv")("\n", ";"); | ||
var csv = require("binary-csv")({separator: ';'}); | ||
@@ -83,7 +83,7 @@ var MediaType = function() { | ||
return (str.indexOf(";") > -1) ? '"' + str + '"' : str; | ||
} | ||
}; | ||
var unwrapQuotes = function(str) { | ||
return (str.substr(0, 1) === '"' && str.substr(-1) === '"') ? str.substr(1, str.length - 2) : str; | ||
} | ||
}; | ||
@@ -90,0 +90,0 @@ var mediaTypeMatcher = /^(application|audio|image|message|model|multipart|text|video)\/([a-zA-Z0-9!#$%^&\*_\-\+{}\|'.`~]{1,127})(;.*)?$/; |
{ | ||
"name": "media-type", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "./lib/mediaType", | ||
@@ -30,4 +30,4 @@ "description": "Parse and validate RFC6838 media types, anything from 'text/plain' to 'application/vnd.company.app.entity-v2+xml;charset=utf8'", | ||
"dependencies": { | ||
"binary-csv": "*" | ||
"binary-csv": "~0.1" | ||
} | ||
} |
@@ -84,3 +84,3 @@ /** | ||
'text/"plain"', | ||
"text/p�ain", | ||
"text/p£ain", | ||
"text/(plain)", | ||
@@ -239,1 +239,16 @@ "text/@plain", | ||
assert.strictEqual(type.toString(), "application/LD+JSON-SQL*CSV.1"); | ||
// https://github.com/lovell/media-type/issues/1 | ||
type = mediaType.fromString("image/svg+xml;charset=utf8;format=foo"); | ||
assert.ok(type.isValid()); | ||
assert.strictEqual(type.type, "image"); | ||
assert.strictEqual(type.subtype, "svg"); | ||
assert.ok(type.hasSuffix()); | ||
assert.strictEqual(type.suffix, "xml"); | ||
assert.deepEqual(type.subtypeFacets, ["svg"]); | ||
assert.deepEqual(type.parameters, {"charset": "utf8", "format": "foo"}); | ||
assert.ok(!type.isVendor()); | ||
assert.ok(!type.isPersonal()); | ||
assert.ok(!type.isExperimental()); | ||
assert.strictEqual(type.toString(), "image/svg+xml;charset=utf8;format=foo"); | ||
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
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
26247
323
0
+ Addedbinary-csv@0.1.7(transitive)
+ Addedthrough@2.3.8(transitive)
- Removedbinary-csv@0.2.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@0.0.1(transitive)
- Removedobject-keys@0.4.0(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedthrough2@0.4.2(transitive)
- Removedxtend@2.1.2(transitive)
Updatedbinary-csv@~0.1