{"_id":"mime-nofs","_rev":"3-3ea3e8d93edd030c427bf92b3f808e56","name":"mime-nofs","description":"A comprehensive library for mime-type mapping without a filesystem dependency","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"mime-nofs","description":"A comprehensive library for mime-type mapping without a filesystem dependency","version":"2.0.0","keywords":["util","mime","no","without","filesystem","fs"],"license":"MIT","repository":{"url":"https://github.com/mpneuried/mime-nofs","type":"git"},"main":"mime.js","bin":{"mime":"cli.js"},"scripts":{"prepublish":"node build/build.js > types.js","test":"node build/test.js"},"author":{"name":"M. Peter","url":"http://github.com/mpneuried"},"contributors":[{"name":"Benjamin Thomas","email":"benjamin@benjaminthomas.org","url":"http://github.com/bentomas"},{"name":"Robert Kieffer","email":"robert@broofa.com","url":"http://github.com/broofa"}],"dependencies":{},"devDependencies":{"mime-db":"^1.2.0"},"gitHead":"29a43f25faa5412b0005e6e23388d6f6cc03b4dc","bugs":{"url":"https://github.com/mpneuried/mime-nofs/issues"},"homepage":"https://github.com/mpneuried/mime-nofs","_id":"mime-nofs@2.0.0","_shasum":"df67a4c43c74b71082c66409b31cde15959eca60","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.25","_npmUser":{"name":"tcs-de","email":"mp@tcs.de"},"maintainers":[{"name":"tcs-de","email":"mp@tcs.de"}],"dist":{"shasum":"df67a4c43c74b71082c66409b31cde15959eca60","tarball":"https://registry.npmjs.org/mime-nofs/-/mime-nofs-2.0.0.tgz","integrity":"sha512-IWfNr9p67w3nujlmV8lRNpoVsJQH6dj3mdWpwMxQLRC2LujqXralHuvdLRcOqgSnPNk8pLPOMOgKIubBT//stg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFypucN8MMDMbVdYXYa6MWKOO8pt3U2zjTJAYPXcs2CrAiEA0JPW8C8H3mjUZ4XSdGAHM9D2NDbWevS0wMxcIdOpqOs="}]}}},"readme":"mime-nofs\n===========\n\nComprehensive MIME type mapping API based on mime-db module.\n\n---\n\n[![Build Status](https://secure.travis-ci.org/mpneuried/mime-nofs.png?branch=master)](http://travis-ci.org/mpneuried/mime-nofs)\n[![Build Status](https://david-dm.org/mpneuried/mime-nofs.png)](https://david-dm.org/mpneuried/mime-nofs)\n[![NPM version](https://badge.fury.io/js/mime-nofs.png)](http://badge.fury.io/js/mime-nofs)\n\nThis is a fork of **[node-mime](https://github.com/broofa/node-mime)** from **[Robert Kieffer (broofa)](https://github.com/broofa)**.  \nI removed the file-system dependency to be able to use it within the browser and other system.  \nAdded a prioritization of non `???/x-???` mime types to fulfill the tests.\n\n[![NPM](https://nodei.co/npm/mime-nofs.png?downloads=true&stars=true)](https://nodei.co/npm/mime-nofs/)\n\n---\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n    npm install mime-nofs\n\n## Contributing / Testing\n\n    npm run test\n\n## Command Line\n\n    mime [path_string]\n\nE.g.\n\n    > mime scripts/jquery.js\n    application/javascript\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.').  E.g.\n\n```js\nvar mime = require('mime');\n\nmime.lookup('/path/to/file.txt');         // => 'text/plain'\nmime.lookup('file.txt');                  // => 'text/plain'\nmime.lookup('.TXT');                      // => 'text/plain'\nmime.lookup('htm');                       // => 'text/html'\n```\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n```js\nmime.extension('text/html');                 // => 'html'\nmime.extension('application/octet-stream');  // => 'bin'\n```\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n```js\nmime.charsets.lookup('text/plain');        // => 'UTF-8'\n```\n\n(The logic for charset lookups is pretty rudimentary.  Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nCustom type mappings can be added on a per-project basis via the following APIs.\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n```js\nmime.define({\n    'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n    'application/x-my-type': ['x-mt', 'x-mtt'],\n    // etc ...\n});\n\nmime.lookup('x-sft');                 // => 'text/x-some-format'\n```\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n```js\nmime.extension('text/x-some-format'); // => 'x-sf'\n```\n\n## Release History\n|Version|Date|Description|\n|:--:|:--:|:--|\n|2.0.0|2015-11-06|initial fork from (node-mime 1.3.4)[https://github.com/broofa/node-mime/releases/tag/v1.3.4]; Changed build to js file; Removed `load` method; Added  prioritization of non `???/x-???` mime types;|\n\n[![NPM](https://nodei.co/npm-dl/mime-nofs.png?months=6)](https://nodei.co/npm/mime-nofs/)\n\n\n## Other projects\n\n|Name|Description|\n|:--|:--|\n|[**aws-s3-form**](https://github.com/mpneuried/aws-s3-form)|Generate a signed and ready to use formdata to put files to s3 directly from the browser. Signing is done by using AWS Signature Version 4|\n|[**node-cache**](https://github.com/tcs-de/nodecache)|Simple and fast NodeJS internal caching. Node internal in memory cache like memcached.|\n|[**domel**](https://github.com/mpneuried/domel)|A simple dom helper if you want to get rid of jQuery|\n|[**backlunr**](https://github.com/mpneuried/backlunr)|A solution to bring Backbone Collections together with the browser fulltext search engine Lunr.js|\n|[**obj-schema**](https://github.com/mpneuried/obj-schema)|Simple module to validate an object by a predefined schema|\n|[**rsmq**](https://github.com/smrchy/rsmq)|A really simple message queue based on Redis|\n|[**rsmq-cli**](https://github.com/mpneuried/rsmq-cli)|a terminal client for rsmq|\n|[**rest-rsmq**](https://github.com/smrchy/rest-rsmq)|REST interface for.|\n|[**redis-notifications**](https://github.com/mpneuried/redis-notifications)|A redis based notification engine. It implements the rsmq-worker to safely create notifications and recurring reports.|\n|[**redis-sessions**](https://github.com/smrchy/redis-sessions)|An advanced session store for NodeJS and Redis|\n|[**connect-redis-sessions**](https://github.com/mpneuried/connect-redis-sessions)|A connect or express middleware to simply use the [redis sessions](https://github.com/smrchy/redis-sessions). With [redis sessions](https://github.com/smrchy/redis-sessions) you can handle multiple sessions per user_id.|\n|[**systemhealth**](https://github.com/mpneuried/systemhealth)|Node module to run simple custom checks for your machine or it's connections. It will use [redis-heartbeat](https://github.com/mpneuried/redis-heartbeat) to send the current state to redis.|\n|[**task-queue-worker**](https://github.com/smrchy/task-queue-worker)|A powerful tool for background processing of tasks that are run by making standard http requests.|\n|[**soyer**](https://github.com/mpneuried/soyer)|Soyer is small lib for serverside use of Google Closure Templates with node.js.|\n|[**grunt-soy-compile**](https://github.com/mpneuried/grunt-soy-compile)|Compile Goggle Closure Templates ( SOY ) templates inclding the handling of XLIFF language files.|\n\n\n## The MIT License (MIT)\n\nCopyright © 2015 M. Peter\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n","maintainers":[{"name":"tcs-de","email":"mp@tcs.de"}],"time":{"modified":"2022-06-19T19:55:26.293Z","created":"2015-11-06T07:54:37.791Z","2.0.0":"2015-11-06T07:54:37.791Z"},"homepage":"https://github.com/mpneuried/mime-nofs","keywords":["util","mime","no","without","filesystem","fs"],"repository":{"url":"https://github.com/mpneuried/mime-nofs","type":"git"},"contributors":[{"name":"Benjamin Thomas","email":"benjamin@benjaminthomas.org","url":"http://github.com/bentomas"},{"name":"Robert Kieffer","email":"robert@broofa.com","url":"http://github.com/broofa"}],"author":{"name":"M. Peter","url":"http://github.com/mpneuried"},"bugs":{"url":"https://github.com/mpneuried/mime-nofs/issues"},"license":"MIT","readmeFilename":"README.md"}