JSPM

dotdir-regex

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3528
  • Score
    100M100P100Q137310F
  • License MIT

Regex for matching dot-directories, like `.git/`

Package Exports

  • dotdir-regex

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dotdir-regex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dotdir-regex NPM version

Regex for matching dot-directories, like .git/

Install

Install with npm

$ npm i dotdir-regex --save

Usage

var re = require('dotdir-regex');

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

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

re.test('a/.git/a/b/');
//=> true
  • dotfile-regex: Regular expresson for matching dotfiles.
  • ext-regex: Regular expression for matching file extensions. Matches single and/or multiple file extensions, like .min.js.
  • filename-regex: Regular expression for matching file names, with or without extension.
  • is-glob: Returns true if the given string looks like a glob pattern.
  • is-dotfile: Return true if a file path is (or has) a dotfile.
  • path-regex: Regular expression for matching the parts of a file path.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on July 07, 2015.