JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 750821
  • Score
    100M100P100Q175110F

Extracts a base path from a node-glob instance

Package Exports

  • glob2base

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (glob2base) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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?