| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/gavin/workspace/readjs/node_modules/glob2base/ |
Upload File : |
# glob2base [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Support us][gittip-image]][gittip-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url]
## Information
<table>
<tr>
<td>Package</td><td>glob2base</td>
</tr>
<tr>
<td>Description</td>
<td>Extracts a base path from a node-glob instance</td>
</tr>
<tr>
<td>Node Version</td>
<td>>= 0.10</td>
</tr>
</table>
## Usage
The module is a function that takes in a node-glob instance and returns a string. Basically it just gives you everything before any globbing/matching happens.
```javascript
var glob2base = require('glob2base');
var glob = require('glob');
// js/
glob2base(new glob.Glob('js/**/*.js'));
// css/test/
glob2base(new glob.Glob('css/test/{a,b}/*.css'));
// pages/whatever/
glob2base(new glob.Glob('pages/whatever/index.html'));
```
## Like what we do?
[gittip-url]: https://www.gittip.com/WeAreFractal/
[gittip-image]: http://img.shields.io/gittip/WeAreFractal.svg
[downloads-image]: http://img.shields.io/npm/dm/glob2base.svg
[npm-url]: https://npmjs.org/package/glob2base
[npm-image]: http://img.shields.io/npm/v/glob2base.svg
[travis-url]: https://travis-ci.org/wearefractal/glob2base
[travis-image]: http://img.shields.io/travis/wearefractal/glob2base.svg
[coveralls-url]: https://coveralls.io/r/wearefractal/glob2base
[coveralls-image]: http://img.shields.io/coveralls/wearefractal/glob2base/master.svg