Regular expression for matching the directory part of a file path.
npm
Install withnpm i dirname-regex --save
Usage
var dirnameRe = ;var match = 'a/b/c/d.md'; match0;//=> 'a/b/c/d.md' match1;//=> 'a/b/c/' match2;//=> 'a/b/c'
See the tests for more use cases and expected results.
Run tests
Install dev dependencies:
node i -d && mocha
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on January 12, 2015.