Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/media-typer

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/media-typer - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

media-typer/index.d.ts

@@ -43,3 +43,3 @@ // Type definitions for media-typer 1.1

*/
suffix?: string;
suffix?: string | undefined;
}
{
"name": "@types/media-typer",
"version": "1.1.0",
"version": "1.1.1",
"description": "TypeScript definitions for media-typer",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/media-typer",
"license": "MIT",

@@ -27,4 +28,4 @@ "contributors": [

"dependencies": {},
"typesPublisherContentHash": "ec7ba9a55ff60ac29121630a3633b565ece023e8747ecd6c1ae5dc2d71bca4f2",
"typeScriptVersion": "2.9"
"typesPublisherContentHash": "68ebf85cdd762373bb8882f5dc5d2348c04f67f5e0bbd9553f319124e3f1afc1",
"typeScriptVersion": "3.6"
}

@@ -9,5 +9,53 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/media-typer.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/media-typer/index.d.ts)
````ts
// Type definitions for media-typer 1.1
// Project: https://github.com/jshttp/media-typer
// Definitions by: BendingBender <https://github.com/BendingBender>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Simple RFC 6838 media type parser.
* This module will parse a given media type into its component parts, like type, subtype, and suffix.
* A formatter is also provided to put them back together and the two can be combined to normalize media types into a canonical form.
* If you are looking to parse the string that represents a media type and its parameters in HTTP (for example, the Content-Type header), use the content-type module
*/
/**
* Parse a media type string
* @throws TypeError If the given type string is invalid
*/
export function parse(mediaType: string): MediaType;
/**
* Format an object into a media type string.
* This will return a string of the mime type for the given object
* @throws TypeError If any of the given object values are invalid
*/
export function format(mediaTypeDescriptor: MediaType): string;
/**
* Validate a media type string
*/
export function test(mediaType: string): boolean;
export interface MediaType {
/**
* The type of the media type (always lower case). Example: `image`
*/
type: string;
/**
* The subtype of the media type (always lower case). Example: `svg`
*/
subtype: string;
/**
* The suffix of the media type (always lower case). Example: `xml`
*/
suffix?: string | undefined;
}
````
### Additional Details
* Last updated: Tue, 12 May 2020 19:57:56 GMT
* Last updated: Tue, 06 Jul 2021 22:03:03 GMT
* Dependencies: none

@@ -14,0 +62,0 @@ * Global values: none

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