Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

glob2base

0.0.12 • Public • Published

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?

Keywords

none

install

npm i glob2base

Downloadsweekly downloads

623,596

version

0.0.12

license

none

repository

githubgithub

last publish

collaborators

  • avatar
  • avatar