This commit is contained in:
cutls
2018-01-28 21:22:43 +09:00
commit 30132ca31d
139 changed files with 40821 additions and 0 deletions

31
node_modules/ext-name/index.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
'use strict';
const extList = require('ext-list');
const sortKeysLength = require('sort-keys-length');
module.exports = str => {
const obj = sortKeysLength.desc(extList());
const exts = Object.keys(obj).filter(x => str.endsWith(x));
if (exts.length === 0) {
return [];
}
return exts.map(x => ({
ext: x,
mime: obj[x]
}));
};
module.exports.mime = str => {
const obj = sortKeysLength.desc(extList());
const exts = Object.keys(obj).filter(x => obj[x] === str);
if (exts.length === 0) {
return [];
}
return exts.map(x => ({
ext: x,
mime: obj[x]
}));
};

21
node_modules/ext-name/license generated vendored Normal file
View File

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

102
node_modules/ext-name/package.json generated vendored Normal file
View File

@@ -0,0 +1,102 @@
{
"_args": [
[
{
"raw": "ext-name@^5.0.0",
"scope": null,
"escapedName": "ext-name",
"name": "ext-name",
"rawSpec": "^5.0.0",
"spec": ">=5.0.0 <6.0.0",
"type": "range"
},
"C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl"
]
],
"_from": "ext-name@>=5.0.0 <6.0.0",
"_id": "ext-name@5.0.0",
"_inCache": true,
"_location": "/ext-name",
"_nodeVersion": "8.0.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/ext-name-5.0.0.tgz_1496851886409_0.42046912061050534"
},
"_npmUser": {
"name": "kevva",
"email": "kevinmartensson@gmail.com"
},
"_npmVersion": "5.0.3",
"_phantomChildren": {},
"_requested": {
"raw": "ext-name@^5.0.0",
"scope": null,
"escapedName": "ext-name",
"name": "ext-name",
"rawSpec": "^5.0.0",
"spec": ">=5.0.0 <6.0.0",
"type": "range"
},
"_requiredBy": [
"/electron-dl"
],
"_resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz",
"_shasum": "70781981d183ee15d13993c8822045c506c8f0a6",
"_shrinkwrap": null,
"_spec": "ext-name@^5.0.0",
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"bugs": {
"url": "https://github.com/kevva/ext-name/issues"
},
"dependencies": {
"ext-list": "^2.0.0",
"sort-keys-length": "^1.0.0"
},
"description": "Get the file extension and MIME type from a file",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"directories": {},
"dist": {
"integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==",
"shasum": "70781981d183ee15d13993c8822045c506c8f0a6",
"tarball": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "4d84e68c9876d1d0933bd832f60d84ed1eeac9da",
"homepage": "https://github.com/kevva/ext-name#readme",
"keywords": [
"ext",
"extname",
"mime"
],
"license": "MIT",
"maintainers": [
{
"name": "kevva",
"email": "kevinmartensson@gmail.com"
}
],
"name": "ext-name",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/kevva/ext-name.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "5.0.0"
}

57
node_modules/ext-name/readme.md generated vendored Normal file
View File

@@ -0,0 +1,57 @@
# ext-name [![Build Status](https://travis-ci.org/kevva/ext-name.svg?branch=master)](https://travis-ci.org/kevva/ext-name)
> Get the file extension and MIME type from a file
## Install
```
$ npm install --save ext-name
```
## Usage
```js
const extName = require('ext-name');
console.log(extName('foobar.tar'));
//=> [{ext: 'tar', mime: 'application/x-tar'}]
console.log(extName.mime('application/x-tar'));
//=> [{ext: 'tar', mime: 'application/x-tar'}]
```
## API
### extName(filename)
Returns an `Array` with objects with the file extension and MIME type.
#### filename
Type: `string`
Get the extension and MIME type from a filename.
### extName.mime(mimetype)
Returns an `Array` with objects with the file extension and MIME type.
#### mimetype
Type: `string`
Get the extension and MIME type from a MIME type.
## Related
* [ext-name-cli](https://github.com/kevva/ext-name-cli) - CLI for this module
* [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array
## License
MIT © [Kevin Mårtensson](https://github.com/kevva)