Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glob2base

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob2base

Extracts a base path from a node-glob instance

  • 0.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593K
decreased by-26.24%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 13 Nov 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc