Socket
Socket
Sign inDemoInstall

glob-stream

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-stream - npm Package Compare versions

Comparing version 5.2.0 to 5.3.0

13

index.js

@@ -8,6 +8,5 @@ 'use strict';

var glob = require('glob');
var Minimatch = require('minimatch').Minimatch;
var micromatch = require('micromatch');
var resolveGlob = require('to-absolute-glob');
var glob2base = require('glob2base');
var path = require('path');
var globParent = require('glob-parent');
var extend = require('extend');

@@ -28,3 +27,3 @@

// Extract base path from glob
var basePath = opt.base || glob2base(globber);
var basePath = opt.base || globParent(ourGlob) + '/';

@@ -113,3 +112,3 @@ // Create stream and map events from globber to it

var ourGlob = resolveGlob(glob, opt);
glob = new Minimatch(ourGlob, ourOpt);
glob = micromatch.matcher(ourGlob, ourOpt);
}

@@ -155,4 +154,4 @@

function isMatch(file, matcher) {
if (matcher instanceof Minimatch) {
return matcher.match(file.path);
if (typeof matcher === 'function') {
return matcher(file.path);
}

@@ -159,0 +158,0 @@ if (matcher instanceof RegExp) {

{
"name": "glob-stream",
"description": "File system globs as a stream",
"version": "5.2.0",
"repository": "wearefractal/glob-stream",
"author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)",
"version": "5.3.0",
"description": "A wrapper around node-glob to make it streamy",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [],
"homepage": "http://gulpjs.com",
"repository": "gulpjs/glob-stream",
"license": "MIT",
"engines": {
"node": ">= 0.10"
},
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"lint": "eslint . && jscs *.js test/",
"pretest": "npm run lint",
"test": "mocha",
"coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
},
"dependencies": {
"extend": "^3.0.0",
"glob": "^5.0.3",
"glob2base": "^0.0.12",
"minimatch": "^2.0.1",
"glob-parent": "^2.0.0",
"micromatch": "^2.3.0",
"ordered-read-streams": "^0.3.0",

@@ -34,12 +47,6 @@ "through2": "^0.6.0",

},
"scripts": {
"lint": "eslint . && jscs *.js test/",
"pretest": "npm run lint",
"test": "mocha",
"coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls"
},
"engines": {
"node": ">= 0.9"
},
"license": "MIT"
"keywords": [
"glob",
"stream"
]
}

@@ -1,22 +0,13 @@

# glob-stream [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# glob-stream
## Information
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
<table>
<tr>
<td>Package</td><td>glob-stream</td>
</tr>
<tr>
<td>Description</td>
<td>File system globs as a stream</td>
</tr>
<tr>
<td>Node Version</td>
<td>>= 0.9</td>
</tr>
</table>
A wrapper around [node-glob][node-glob-url] to make it streamy.
This is a simple wrapper around node-glob to make it streamy.
## Usage

@@ -27,3 +18,3 @@

var stream = gs.create('./files/**/*.coffee', {options});
var stream = gs.create('./files/**/*.coffee', { /* options */ });

@@ -37,2 +28,12 @@ stream.on('data', function(file){

## API
### create(globs, options)
Returns a stream for multiple globs or filters.
### createStream(positiveGlob, negativeGlobs, options)
Returns a stream for a single glob or filter.
### Options

@@ -43,3 +44,3 @@

- base
- Default is everything before a glob starts (see [glob2base](https://github.com/wearefractal/glob2base))
- Default is everything before a glob starts (see [glob-parent][glob-parent-url])
- cwdbase

@@ -51,7 +52,7 @@ - Default is `false`

- If true, won't emit an error when a glob pointing at a single file fails to match
- Any through2 related options are documented in [through2](https://github.com/rvagg/through2)
- Any through2 related options are documented in [through2][through2-url]
This argument is passed directly to [node-glob](https://github.com/isaacs/node-glob) so check there for more options
This argument is passed directly to [node-glob][node-glob-url] so check there for more options
#### Glob
### Glob

@@ -74,7 +75,16 @@ ```js

#### Related
## Related
- [globby](https://github.com/sindresorhus/globby) - Non-streaming `glob` wrapper with support for multiple patterns.
- [globby][globby-url] - Non-streaming `glob` wrapper with support for multiple patterns.
## License
MIT
[globby-url]: https://github.com/sindresorhus/globby
[through2-url]: https://github.com/rvagg/through2
[node-glob-url]: https://github.com/isaacs/node-glob
[glob-parent-url]: https://github.com/es128/glob-parent
[downloads-image]: http://img.shields.io/npm/dm/glob-stream.svg
[npm-url]: https://www.npmjs.com/package/glob-stream

@@ -89,3 +99,3 @@ [npm-image]: https://badge.fury.io/js/glob-stream.svg

[david-url]: https://david-dm.org/gulpjs/glob-stream
[david-image]: https://david-dm.org/gulpjs/glob-stream.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png

Sorry, the diff of this file is not supported yet

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