Installations
npm install @paulcbetts/mime-db
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>= 0.6
Node Version
5.10.0
NPM Version
3.8.5
Score
79.9
Supply Chain
93.3
Quality
75.2
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
JavaScript (100%)
Developer
jshttp
Download Statistics
Total Downloads
959,637
Last Day
1,172
Last Week
4,554
Last Month
16,567
Last Year
194,549
GitHub Statistics
1,128 Stars
834 Commits
263 Forks
45 Watching
12 Branches
94 Contributors
Bundle Size
2.69 kB
Minified
680.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.22.4
Package Id
@paulcbetts/mime-db@1.22.4
Size
5.41 kB
NPM Version
3.8.5
Node Version
5.10.0
Total Downloads
Cumulative downloads
Total Downloads
959,637
Last day
55.9%
1,172
Compared to previous day
Last week
8.1%
4,554
Compared to previous week
Last month
-5.3%
16,567
Compared to previous month
Last year
163.3%
194,549
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
mime-db
This is a database of all mime types. It consists of a single, public JSON file and does not include any logic, allowing it to remain as un-opinionated as possible with an API. It aggregates data from the following sources:
- http://www.iana.org/assignments/media-types/media-types.xhtml
- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
Installation
1npm install mime-db
Database Download
If you're crazy enough to use this in the browser, you can just grab the
JSON file using RawGit. It is recommended to replace
master
with a release tag as the
JSON format may change in the future.
https://cdn.rawgit.com/jshttp/mime-db/master/db.json
Usage
1var db = require('mime-db'); 2 3// grab data on .js files 4var data = db['application/javascript'];
Data Structure
The JSON file is a map lookup for lowercased mime types. Each mime type has the following properties:
.source
- where the mime type is defined. If not set, it's probably a custom media type.apache
- Apache common media typesiana
- IANA-defined media typesnginx
- nginx media types
.extensions[]
- known extensions associated with this mime type..compressible
- whether a file of this type can be gzipped..charset
- the default charset associated with this type, if any.
If unknown, every property could be undefined
.
Contributing
To edit the database, only make PRs against src/custom.json
or
src/custom-suffix.json
.
To update the build, run npm run build
.
Adding Custom Media Types
The best way to get new media types included in this library is to register them with the IANA. The community registration procedure is outlined in RFC 6838 section 5. Types registered with the IANA are automatically pulled into this library.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
project has 18 contributing companies or organizations
Details
- Info: repo-utils contributor org/company found, ExpressGateway contributor org/company found, koajs contributor org/company found, pau-ci contributor org/company found, pillarjs contributor org/company found, fripfrap contributor org/company found, stream-utils contributor org/company found, use-init contributor org/company found, crypto-utils contributor org/company found, nodejs contributor org/company found, mysqljs contributor org/company found, expressjs contributor org/company found, jshttp contributor org/company found, houzz contributor org/company found, diveintomark contributor org/company found, h5bp contributor org/company found, whatwg contributor org/company found, citation-style-language contributor org/company found,
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
5 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 7
Reason
6 out of 12 merged PRs checked by a CI test -- score normalized to 5
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/jshttp/.github/SECURITY.md:1
- Warn: no linked content found
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/jshttp/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/jshttp/.github/SECURITY.md:1
Reason
Found 11/29 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:127
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:223
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:234
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:241
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:251
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate.yml:18
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate.yml:21
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate.yml:32
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:173
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:189
- Warn: npmCommand not pinned by hash: .github/workflows/generate.yml:27
- Warn: npmCommand not pinned by hash: .github/workflows/generate.yml:30
- Info: 3 out of 9 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 3 third-party GitHubAction dependencies pinned
- Info: 0 out of 4 npmCommand dependencies pinned
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no update tool detected
Details
- Warn: no dependency update tool configurations found
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 12 are checked with a SAST tool
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/generate.yml:9
- Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18
- Info: no jobLevel write permissions found
Score
4.5
/10
Last Scanned on 2025-01-20T21:24:11Z
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