glob2base / 0.0.12 last updated a year ago created on Dec 17th 2013

Install

npm install --save glob2base

Clone

git clone git@github.com:wearefractal/glob2base.git

dependencies

main find-index 0.1.1 MIT

maintainers

fractal fractal

versions 12 total

0.0.12 a year ago fractal
0.0.11 2 years ago fractal
0.0.10 2 years ago fractal
0.0.9 2 years ago fractal
0.0.8 2 years ago fractal
0.0.7 2 years ago fractal
0.0.6 2 years ago fractal
0.0.5 2 years ago fractal
0.0.4 2 years ago fractal
0.0.3 2 years ago fractal
0.0.2 2 years ago fractal
0.0.1 2 years ago fractal
24737 Downloads yesterday.

readme

glob2base NPM version Downloads Support us Build Status Coveralls Status

Information

Packageglob2base
Description Extracts a base path from a node-glob instance
Node Version >= 0.10

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.

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?

Resolving all dependencies.. This could take a while as our cache is not yet fully warmed up.