@ultirequiem/file-extension
v3.0.3
Published
Get the extension of a file path.
Maintainers
Readme
Get File Extension
Get the extension of a file path.
Ported from Browserify ❤
Install
npm install @ultirequiem/file-extensionUsage
ESM only, types included: the same import works in Node.js, Bun and browsers.
import { extname } from "@ultirequiem/file-extension";
extname("main.py"); // .py
extname({ path: "App.js", leadingPeriod: true }); // .js
extname({ path: "mod.ts", leadingPeriod: false }); // tsSupport
Open an Issue, I will check it as soon as possible 👀
If you want to hurry me up a bit send me a tweet 😆
Don't forget to star the repo ⭐
Versioning
We use Semantic Versioning. For the versions available, see the tags 🏷️
Licence
Licensed under the MIT License 📄
