Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 622 Bytes

.verb.md

File metadata and controls

29 lines (20 loc) · 622 Bytes

Usage

To be considered a dot file:

  • the path must contain a dot that is at the beginning of the string or following a slash
  • the next character after the dot must not be another dot
  • one or more characters must follow the dot
  • a slash must not follow the dot

To check for dot directories, use [dotdir-regex][] instead.

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

dotfileRegex().test('a/b/c.js');
//=> false

dotfileRegex().test('./git');
//=> false

dotfileRegex().test('.git/foo');
//=> false

dotfileRegex().test('.gitignore');
//=> true

dotfileRegex().test('a/b/c/.gitignore');
//=> true