
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
file-extension
Advanced tools
Get the extension of a given filename or path
Differences to path.extname
:
.eslintrc
=> eslintrc
)Makefile
=> makefile
)package.json
=> json
)LICENCE
=> licence
)Works in Node.js and the browser. The module's size is currently 267 bytes gzipped.
$ npm install --save file-extension
<script src="file-extension.js"></script>
<!-- Available as global `fileExtension` -->
var fileExtension = require('file-extension'); // Skip this in the browser
// Case insensitive
fileExtension('file.zip'); //=> 'zip'
fileExtension('.Dockerfile'); //=> 'dockerfile'
fileExtension('file'); //=> 'file'
fileExtension('.file.tar'); //=> 'tar'
// Or with case preserved
fileExtension('.Vagrantfile', {preserveCase: true}); //=> 'Vagrantfile'
fileExtension('INDEX.HTML', {preserveCase: true}); //=> 'HTML'
filename
{String} The file name. Required.options
{Object} Options object.preserveCase
{Boolean} Whether case should be preserved. Default: false.© silverwind, distributed under BSD licence
FAQs
Get the extension of a given filename or path
The npm package file-extension receives a total of 88,896 weekly downloads. As such, file-extension popularity was classified as popular.
We found that file-extension demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.