Check if a file/folder is hidden on all platforms.
- Unix: Check file name starts with
.
. - Windows: Check if file hidden using native code.
- npm:
npm i is-hidden-file
- yarn:
yarn add is-hidden-file
const { isHiddenFile } = require("is-hidden-file");
console.log(isHiddenFile(".git")) // true
console.log(isHiddenFile("README.md")) // false
import { isHiddenFile } from "is-hidden-file";
console.log(isHiddenFile(".git")) // true
console.log(isHiddenFile("README.md")) // false
MIT