Socket
Socket
Sign inDemoInstall

glob2base

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    glob2base

Extracts a base path from a node-glob instance


Version published
Weekly downloads
555K
decreased by-3.35%
Maintainers
1
Install size
8.95 kB
Created
Weekly downloads
 

Readme

Source

glob2base NPM version Downloads Support us Build Status Coveralls Status

Information

Packageglob2base
DescriptionExtracts 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?

FAQs

Last updated on 13 Nov 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc