Acme.BookStore.HttpApi.Host/node_modules/glob-stream/README.md

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<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

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]

A [Readable Stream][readable-stream-url] interface over [node-glob][node-glob-url].

## Usage

```javascript
var gs = require('glob-stream');

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

var writable = /* your WriteableStream */

readable.pipe(writable);
```

You can pass any combination of glob strings. One caveat is that you cannot __only__ pass a negative glob, you must give it at least one positive glob so it knows where to start. If given a non-glob path (also referred to as a singular glob), only one file will be emitted. If given a singular glob and no files match, an error is emitted (see also [`options.allowEmpty`][allow-empty-url]).

## API

### `globStream(globs, options)`

Takes a glob string or an array of glob strings as the first argument and an options object as the second. Returns a stream of objects that contain `cwd`, `base` and `path` properties.

#### Options

##### `options.allowEmpty`

Whether or not to error upon an empty singular glob.

Type: `Boolean`

Default: `false` (error upon no match)

##### `options.dot`

Whether or not to treat dotfiles as regular files. This is passed through to [node-glob][node-glob-url].

Type: `Boolean`

Default: `false`

##### `options.silent`

Whether or not to suppress warnings on stderr from [node-glob][node-glob-url]. This is passed through to [node-glob][node-glob-url].

Type: `Boolean`

Default: `true`

##### `options.cwd`

后面还有 86 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。