jshttp / type-is

Infer the content-type of a request.
MIT License
228 stars 32 forks source link

document `is()` method #10

Closed afeld closed 9 years ago

afeld commented 9 years ago

The user of the library may not want to pass in a request object, but instead the simple media type string. Since this method is already available (albeit awkward, since the variable used in the examples is is), it might as well be documented. In my use case, I am trying to check the Content-Type of the response in Express middleware. Thanks!

jonathanong commented 9 years ago

thanks! was meaning to do this! d16b51739d47419a0b90814dd52a362fe3ac7c94