Git Product home page Git Product logo

Comments (12)

jonathanong avatar jonathanong commented on June 6, 2024

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.

Fishrock123 avatar Fishrock123 commented on June 6, 2024

Just remove all of them and check if the property exists haha.

from mime-db.

dougwilson avatar dougwilson commented on June 6, 2024

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.

jonathanong avatar jonathanong commented on June 6, 2024

i think the falses 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.

dougwilson avatar dougwilson commented on June 6, 2024

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

Fishrock123 avatar Fishrock123 commented on June 6, 2024

How do exactly do we plan on basing it off IANA?

from mime-db.

dougwilson avatar dougwilson commented on June 6, 2024

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.

Fishrock123 avatar Fishrock123 commented on June 6, 2024

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.

jonathanong avatar jonathanong commented on June 6, 2024

my goal here is to reduce duplication :)

from mime-db.

dougwilson avatar dougwilson commented on June 6, 2024

yea. i talked to @jonathanong on irc and i changed my mind

from mime-db.

jonathanong avatar jonathanong commented on June 6, 2024

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.

dougwilson avatar dougwilson commented on June 6, 2024

higher level libs can do the regexp checks themselves

👍 make this more like a plain database :)

from mime-db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.