Comments (12)
this is supposed to be the only db any mime lib should need. but yeah, a lot of those are unnecessary. probably gonna remove the ones added by scripts/build.js
from mime-db.
Just remove all of them and check if the property exists haha.
from mime-db.
Actually I like them there, because it communicates three things
true it is compressible
false it is not
undefined we don't know
from mime-db.
i think the false
s in lib/compressible.json
is fine. i'm thinking about removing these guesses since it can be done by the higher level lib: https://github.com/jshttp/mime-db/blob/master/scripts/build.js#L61
from mime-db.
@jonathanong it should be based off IANA, yes. the way it is was just subjective by your regular express, which would belong somewhere else :)
from mime-db.
How do exactly do we plan on basing it off IANA?
from mime-db.
We just have to read the registered RFCs I guess. For example RFC 6838 states that text/*
is only for data that is primarily textual, so based on that, we can blanket say everything there is compressible or something. There is also the RFC for the +xml
and +json
suffixes, which state what the mean, so we can do the same there: say they are all compressible or something.
the more i think about it, though, the more this sounds like a job for compressible
module, really, to contain these mappings?
from mime-db.
the more i think about it, though, the more this sounds like a job for compressible module, really, to contain these mappings?
Well that's what I said in the first place. It doesn't really make sense here, but it does reduce duplication I... guess?
from mime-db.
my goal here is to reduce duplication :)
from mime-db.
yea. i talked to @jonathanong on irc and i changed my mind
from mime-db.
k leaving the compressible stuff here. i also removed all the regexp checks for compressible and charset. higher level libs can do the regexp checks themselves
from mime-db.
higher level libs can do the regexp checks themselves
👍 make this more like a plain database :)
from mime-db.
Related Issues (20)
- '.zip' file has a 'application/x-zip-compressed' in Windows. HOT 2
- What are the allowed characters for an extension? HOT 6
- .asc extension maps to application/pgp-signature instead of application/pgp-keys HOT 1
- TypeScript file extensions map to incorrect file types HOT 1
- Re-raising the now updated JS mime-type issue (from #194) HOT 7
- Add `.json` extension for `application/jf2feed+json` HOT 2
- `.mov` vs `.qt` HOT 9
- Add .yamlld extension HOT 1
- YAML is application/yaml HOT 3
- Add image/jpeg for .jfif file extension
- ts extension incorrectly mapped to video/mp2t ? HOT 4
- Update existing dcm format HOT 1
- Minify `db.json` file HOT 5
- Missing extensions list for model/step HOT 2
- YAML missing some types HOT 5
- text/calender
- Broken tests for Node@8 and Node@9
- Add `application/x-python-code` and `text/x-python` types
- Add mime types for `mhtml` files
- Missing extensions from vnd.comicbook+zip and vnd.comicbook-rar registered with IANA HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mime-db.