diff options
Diffstat (limited to 'node_modules/ext-list')
-rw-r--r-- | node_modules/ext-list/index.js | 18 | ||||
-rw-r--r-- | node_modules/ext-list/license | 21 | ||||
-rw-r--r-- | node_modules/ext-list/package.json | 32 | ||||
-rw-r--r-- | node_modules/ext-list/readme.md | 25 |
4 files changed, 96 insertions, 0 deletions
diff --git a/node_modules/ext-list/index.js b/node_modules/ext-list/index.js new file mode 100644 index 0000000..ebee2ce --- /dev/null +++ b/node_modules/ext-list/index.js @@ -0,0 +1,18 @@ +'use strict'; +var mimeDb = require('mime-db'); + +module.exports = function () { + var ret = {}; + + Object.keys(mimeDb).forEach(function (x) { + var val = mimeDb[x]; + + if (val.extensions && val.extensions.length > 0) { + val.extensions.forEach(function (y) { + ret[y] = x; + }); + } + }); + + return ret; +}; diff --git a/node_modules/ext-list/license b/node_modules/ext-list/license new file mode 100644 index 0000000..a8ecbbe --- /dev/null +++ b/node_modules/ext-list/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/ext-list/package.json b/node_modules/ext-list/package.json new file mode 100644 index 0000000..cd2e0bc --- /dev/null +++ b/node_modules/ext-list/package.json @@ -0,0 +1,32 @@ +{ + "name": "ext-list", + "version": "2.2.2", + "description": "List of known file extensions and their MIME types", + "license": "MIT", + "repository": "kevva/ext-list", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "https://github.com/kevva" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ext", + "mime" + ], + "dependencies": { + "mime-db": "^1.28.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/ext-list/readme.md b/node_modules/ext-list/readme.md new file mode 100644 index 0000000..893064d --- /dev/null +++ b/node_modules/ext-list/readme.md @@ -0,0 +1,25 @@ +# ext-list [![Build Status](http://img.shields.io/travis/kevva/ext-list.svg?style=flat)](https://travis-ci.org/kevva/ext-list) + +> Return a list of known [file extensions](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) and their MIME types + + +## Install + +``` +$ npm install --save ext-list +``` + + +## Usage + +```js +const extList = require('ext-list'); + +extList(); +//=> {'123': 'application/vnd.lotus-1-2-3', ez: 'application/andrew-inset', aw: 'application/applixware', ...} +``` + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) |