Comparing version 0.2.2 to 1.0.0
10
index.js
@@ -1,4 +0,4 @@ | ||
'use strict' | ||
const EventEmitter = require('events') | ||
module.exports = MiddlewareBase => class Mime extends MiddlewareBase { | ||
class Mime extends EventEmitter { | ||
description () { | ||
@@ -8,4 +8,4 @@ return 'Customise the mime-type returned with any static resource.' | ||
middleware (options) { | ||
const mimeTypes = options.mime | ||
middleware (config) { | ||
const mimeTypes = config.mime | ||
if (mimeTypes) { | ||
@@ -25,1 +25,3 @@ this.emit('verbose', 'middleware.mime.config', { mime: mimeTypes }) | ||
} | ||
module.exports = Mime |
{ | ||
"name": "lws-mime", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.2.2", | ||
"version": "1.0.0", | ||
"description": "Middleware to manipulate response MIME types in lws", | ||
@@ -13,12 +13,15 @@ "repository": "https://github.com/lwsjs/mime.git", | ||
"engines": { | ||
"node": ">=7.6" | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "test-runner test.js" | ||
}, | ||
"devDependencies": { | ||
"lws": "^1.0.0-pre4.0", | ||
"req-then": "^0.6.4", | ||
"test-runner": "^0.4.0" | ||
} | ||
"lws": "^2.0.0-7", | ||
"node-fetch": "^2.6.0", | ||
"test-runner": "^0.6.0" | ||
}, | ||
"files": [ | ||
"index.js" | ||
] | ||
} |
[![view on npm](https://img.shields.io/npm/v/lws-mime.svg)](https://www.npmjs.org/package/lws-mime) | ||
[![npm module downloads](https://img.shields.io/npm/dt/lws-mime.svg)](https://www.npmjs.org/package/lws-mime) | ||
[![Build Status](https://travis-ci.org/lwsjs/mime.svg?branch=master)](https://travis-ci.org/lwsjs/mime) | ||
[![Dependency Status](https://david-dm.org/lwsjs/mime.svg)](https://david-dm.org/lwsjs/mime) | ||
[![Dependency Status](https://badgen.net/david/dep/lwsjs/mime)](https://david-dm.org/lwsjs/mime) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard) | ||
@@ -13,2 +13,2 @@ | ||
© 2017 Lloyd Brookes <75pound@gmail.com>. | ||
© 2016-19 Lloyd Brookes \<75pound@gmail.com\>. |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
14
3142
4
22