Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.10 (2024-07-22 09:58:33)
<a name="2.0.10"></a>
FAQs
Creates a list of file extensions and their "real" names
The npm package ac-file-extensions receives a total of 179 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.