Socket
Socket
Sign inDemoInstall

mime-match

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mime-match - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

4

example.js

@@ -14,1 +14,5 @@ var match = require('./');

// --> ['image/*']
// charset suffix is ignored
console.log(match('application/json', 'application/json; charset=utf-8'));
// --> true

2

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc