Gathering detailed insights and metrics for @types/media-typer
Gathering detailed insights and metrics for @types/media-typer
Gathering detailed insights and metrics for @types/media-typer
Gathering detailed insights and metrics for @types/media-typer
The repository for high quality TypeScript type definitions.
npm install @types/media-typer
Typescript
Module System
TypeScript (99.84%)
JavaScript (0.15%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
50,033 Stars
89,737 Commits
30,434 Forks
640 Watchers
6 Branches
9,957 Contributors
Updated on Jul 14, 2025
Latest Version
1.1.3
Package Id
@types/media-typer@1.1.3
Unpacked Size
5.29 kB
Size
2.03 kB
File Count
5
Published on
Nov 07, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
npm install --save @types/media-typer
This package contains type definitions for media-typer (https://github.com/jshttp/media-typer).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/media-typer.
1/** 2 * Simple RFC 6838 media type parser. 3 * This module will parse a given media type into its component parts, like type, subtype, and suffix. 4 * A formatter is also provided to put them back together and the two can be combined to normalize media types into a canonical form. 5 * 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 6 */ 7 8/** 9 * Parse a media type string 10 * @throws TypeError If the given type string is invalid 11 */ 12export function parse(mediaType: string): MediaType; 13/** 14 * Format an object into a media type string. 15 * This will return a string of the mime type for the given object 16 * @throws TypeError If any of the given object values are invalid 17 */ 18export function format(mediaTypeDescriptor: MediaType): string; 19 20/** 21 * Validate a media type string 22 */ 23export function test(mediaType: string): boolean; 24 25export interface MediaType { 26 /** 27 * The type of the media type (always lower case). Example: `image` 28 */ 29 type: string; 30 /** 31 * The subtype of the media type (always lower case). Example: `svg` 32 */ 33 subtype: string; 34 /** 35 * The suffix of the media type (always lower case). Example: `xml` 36 */ 37 suffix?: string | undefined; 38} 39
These definitions were written by BendingBender, and Piotr Błażejewicz.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 27/30 approved changesets -- score normalized to 9
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 8
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More