Comparing version 1.0.0 to 1.0.2
@@ -14,1 +14,5 @@ var match = require('./'); | ||
// --> ['image/*'] | ||
// charset suffix is ignored | ||
console.log(match('application/json', 'application/json; charset=utf-8')); | ||
// --> true |
@@ -23,3 +23,3 @@ var wildcard = require('wildcard'); | ||
return pattern ? test(pattern) : test; | ||
return pattern ? test(pattern.split(';')[0]) : test; | ||
}; |
{ | ||
"name": "mime-match", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "A simple function to check whether a mimetype matches the specified mimetype (with wildcard support)", | ||
@@ -28,4 +28,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"tape": "^3.5.0" | ||
"tape": "^4.5.1" | ||
} | ||
} | ||
} |
@@ -9,3 +9,3 @@ # mime-match | ||
[![Build Status](https://img.shields.io/travis/DamonOehlman/mime-match.svg?branch=master)](https://travis-ci.org/DamonOehlman/mime-match) | ||
[![Build Status](https://api.travis-ci.org/DamonOehlman/mime-match.svg?branch=master)](https://travis-ci.org/DamonOehlman/mime-match) [![bitHound Score](https://www.bithound.io/github/DamonOehlman/mime-match/badges/score.svg)](https://www.bithound.io/github/DamonOehlman/mime-match) | ||
@@ -29,2 +29,6 @@ ## Example Usage | ||
// charset suffix is ignored | ||
console.log(match('application/json', 'application/json; charset=utf-8')); | ||
// --> true | ||
``` | ||
@@ -36,3 +40,3 @@ | ||
Copyright (c) 2015, Damon Oehlman <damon.oehlman@gmail.com> | ||
Copyright (c) 2016, Damon Oehlman <damon.oehlman@gmail.com> | ||
@@ -39,0 +43,0 @@ Permission to use, copy, modify, and/or distribute this software for any |
@@ -41,1 +41,6 @@ var test = require('tape'); | ||
}); | ||
test('charset suffix is ignored', function(t) { | ||
t.plan(1); | ||
t.ok(match('application/json', 'application/json; charset=utf-8')); | ||
}); |
Sorry, the diff of this file is not supported yet
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
4843
67
51