Skip to content

kimlimjustin/is-hidden-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-hidden-file

npm version

Check if a file/folder is hidden on all platforms.

  • Unix: Check file name starts with ..
  • Windows: Check if file hidden using native code.

Installation

  • npm: npm i is-hidden-file
  • yarn: yarn add is-hidden-file

Usage

Node js

const { isHiddenFile } = require("is-hidden-file");

console.log(isHiddenFile(".git")) // true
console.log(isHiddenFile("README.md")) // false

Node js with typescript

import { isHiddenFile } from "is-hidden-file";

console.log(isHiddenFile(".git")) // true
console.log(isHiddenFile("README.md")) // false

License

MIT