New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fast-content-type-parse

Package Overview
Dependencies
Maintainers
10
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-content-type-parse - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

eslint.config.js

43

package.json
{
"name": "fast-content-type-parse",
"version": "2.0.0",
"version": "2.0.1",
"description": "Parse HTTP Content-Type header according to RFC 7231",

@@ -10,4 +10,4 @@ "main": "index.js",

"benchmark": "node benchmarks/simple.js && node benchmarks/simple-ows.js && node benchmarks/with-param.js && node benchmarks/with-param-quoted.js",
"lint": "standard",
"lint:fix": "standard --fix",
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "npm run test:unit && npm run test:typescript",

@@ -22,2 +22,22 @@ "test:typescript": "tsd",

"author": "Aras Abbasi <aras.abbasi@gmail.com>",
"contributors": [
{
"name": "Gürgün Dayıoğlu",
"email": "hey@gurgun.day",
"url": "https://heyhey.to/G"
},
{
"name": "Manuel Spigolon",
"email": "behemoth89@gmail.com"
},
{
"name": "James Sumners",
"url": "https://james.sumners.info"
},
{
"name": "Frazer Smith",
"email": "frazer.dev@icloud.com",
"url": "https://github.com/fdawgs"
}
],
"license": "MIT",

@@ -28,2 +48,16 @@ "repository": {

},
"bugs": {
"url": "https://github.com/fastify/fast-content-type-parse/issues"
},
"homepage": "https://github.com/fastify/fast-content-type-parse#readme",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fastify"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fastify"
}
],
"devDependencies": {

@@ -34,3 +68,4 @@ "@fastify/pre-commit": "^2.1.0",

"content-type": "^1.0.4",
"standard": "^17.0.0",
"eslint": "^9.17.0",
"neostandard": "^0.12.0",
"tap": "^19.2.5",

@@ -37,0 +72,0 @@ "tsd": "^0.31.0"

22

README.md
# fast-content-type-parse
Parse HTTP Content-Type header according to RFC 7231
<div align="center">

@@ -9,4 +7,4 @@

[![NPM downloads](https://img.shields.io/npm/dm/fast-content-type-parse.svg?style=flat)](https://www.npmjs.com/package/fast-content-type-parse)
[![Build Status](https://github.com/fastify/fast-content-type-parse/workflows/CI/badge.svg)](https://github.com/fastify/fast-content-type-parse/actions)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
[![CI](https://github.com/fastify/fast-content-type-parse/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/fast-content-type-parse/actions/workflows/ci.yml)
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)
[![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/fastify/.github/blob/main/SECURITY.md)

@@ -16,2 +14,4 @@

Parse HTTP Content-Type header according to RFC 7231.
## Installation

@@ -40,7 +40,7 @@

- `type`: The media type (the type and subtype, always lower case).
- `type`: The media type (the type and subtype, always lowercase).
Example: `'application/json'`
- `parameters`: An object of the parameters in the media type (name of parameter
always lower case). Example: `{charset: 'utf-8'}`
always lowercase). Example: `{charset: 'utf-8'}`

@@ -58,7 +58,7 @@ ### fastContentTypeParse.safeParse(string)

- `type`: The media type (the type and subtype, always lower case).
- `type`: The media type (the type and subtype, always lowercase).
Example: `'application/json'`
- `parameters`: An object of the parameters in the media type (name of parameter
always lower case). Example: `{charset: 'utf-8'}`
always lowercase). Example: `{charset: 'utf-8'}`

@@ -82,2 +82,6 @@ In case the header is invalid, it will return an object

Based on the npm package `content-type`
Based on the npm package `content-type`.
## License
Licensed under [MIT](./LICENSE).

@@ -14,6 +14,6 @@ interface ContentType {

export function parse(header: string): ContentType;
export function safeParse(header: string): ContentType;
export const defaultContentType: ContentType;
export function parse (header: string): ContentType
export function safeParse (header: string): ContentType
export const defaultContentType: ContentType
const fastContentTypeParse: FastContentTypeParse

@@ -23,2 +23,2 @@ export { fastContentTypeParse as default }

export = fastContentTypeParse
export = fastContentTypeParse

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc