glob2base

2018-12-08 admin

glob2base是什么

什么是glob2base,Extracts a base path from a node-glob instance

glob2base使用教程帮助文档

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'));

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-47596.html

文章标题:glob2base

回到顶部