Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 580 Bytes

.verb.md

File metadata and controls

23 lines (16 loc) · 580 Bytes

Usage

To be considered a dot directory:

  • 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 non-slash characters must follow the dot
  • a slash must follow after at least one non-dot, non-slash character

To check for dot files, use [dotfile-regex][] instead.

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

var match = regex().exec('.git/a/b/c');
// match[1] => '.git'

regex().test('a/b/c/.gitignore');
//=> false

regex().test('a/.git/a/b/');
//=> true