Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 519 Bytes

.verb.md

File metadata and controls

29 lines (21 loc) · 519 Bytes

Usage

To be considered a dotfile, it must be the last filename in the path, like .gitignore. Otherwise it's a [dot directory][is-dotdir], like .git/ and .github/.

var isDotfile = require('{%= name %}');

false

All of the following return false:

isDotfile('a/b/c.js');
isDotfile('/.git/foo');
isDotfile('a/b/c/.git/foo');
//=> false

true

All of the following return true:

isDotfile('a/b/.gitignore');
isDotfile('.gitignore');
isDotfile('/.gitignore');
//=> true