exty
Curried file-extension checks for relative and absolute paths, including dotfiles.
- Built with
- Node.js, JavaScript
import { isJS, isTS, isJSON } from "exty";
const jsPath = "../index.js";
const tsPath = "./index.ts";
const jsonPath = "/home/user/project/package.json";
isJS(jsPath); //true
isTS(tsPath); //true
isJSON(jsonPath); //true