
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ac-file-extensions
Advanced tools
This little helper creates a list of file extensions including their "real" name and mimetype.
Use it to determine mimetype from extenstion, a prettyfied name or vice versa.
Currently support more than 300 file types.
If you upgrade to version 2, please note that there a breaking changes. While version 1 only provided a list of file extensions, version 2 can be used to easily query extensions.
Use yarn add ac-file-extensions or npm install ac-file-extensions.
After installation this package will automatically create the collection.js file from sources.
const fileExtensions = require('ac-file-extensions')
// search from mp4
const result = fileExtensions.query({ ext: 'mp4' })
console.log(result)
// { "ext": "mp4", "name": "MPEG-4 Video", "mimetype": "video/mp4" }
// retrieve the whole list
fileExtensions.list()
You can use query with parameter:
If you want to add a new file extension, choose the right folder and add it like the other file extension. Use pull requests to send updates.
To commit, add it with git-add (or any GUI) and then use "make commit" on the CLI and answer the questions there. If you're done and want to release a new version, run "make release".
Publishing to npm must be done manually.
Please note, that this package is the successor of file-extensions. That's why it starts with version 1.2.0.
Please do not use package file-extensions any longer.
MIT License Copyright © 2009-present, AdmiralCloud AG, Mark Poepping
2.0.9 (2024-06-03 15:29:36)
FAQs
Creates a list of file extensions and their "real" names
The npm package ac-file-extensions receives a total of 17 weekly downloads. As such, ac-file-extensions popularity was classified as not popular.
We found that ac-file-extensions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.