v1.0.0
π Get the extension of a file
Repository
Current version released
3 years ago
Versions
Get File Extension
You can get this package by nest.land, deno.land or denopkg.
Usage
This package exposes two Functions, sum and sumSync.
import getFileExtension, { getFileExtensionSync } from "https://deno.land/x/get_file_extension/mod.ts";
console.log(await getFileExtension("test.py")); // "py"
async function somethingAsync() {
console.log(await getFileExtension("main.rs")); // "rs"
}
somethingAsync();
getFileExtension("README.md").then((ext) => console.log(ext)); // "md"
console.log(getFileExtensionSync("egg.json")); // "json"
License
This project is licensed under the MIT License.