Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Extracts a base path from a node-glob instance
branch: master
Failed to load latest commit information.
test rewrite glob expansion flattening algorithm, closes #3
.editorconfig update project to new boilerplate, get code coverage, etc.
.gitignore
.jshintrc update project to new boilerplate, get code coverage, etc.
.npmignore
.travis.yml update project to new boilerplate, get code coverage, etc.
LICENSE update project to new boilerplate, get code coverage, etc.
README.md Update README.md
index.js update deps, clear lodash to save size
package.json 0.0.12

README.md

glob2base NPM version Downloads Support us Build Status Coveralls Status

Information

Package glob2base
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'));
Something went wrong with that request. Please try again.