1.2.0 • Published 7 years ago

glob-rx v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

glob-rx

js-standard-style npm bitHound Dependencies bitHound Dev Dependencies Commitizen friendly semantic-release

Linux/OSXWindows
Build StatusBuild status

RxJS Wrapper around the glob function.

Usage

Install from NPM

npm install --save glob-rx

Use it as an observable.

var globRx = require('glob-rx');

globRx(pattern, options)
    .subscribe(
        function(file) {
            // .. do something with file
            console.log(file.fullname);
        },
        function(err) {
            // ... error handling
        },
        function() {
            // ... end of files
        });

This module wraps the glob function in an observable, so the pattern and options parameters are the same.

Output

The observable returns an object with two properties:

  • basedir - the base directory the pattern is relative to (corresponds to the cwd property in the options passed to the glob function).

  • name - the file name relative to the basedir property.

The object also supports a number of calculated properties to get additional information about the file.

  • fullname - returns the full name of the file (the basedir plus the name).

  • basename - returns the base filename without any path.

  • dirname - return the full path, without the file name.

  • extname - returns the file extension.

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

1.0.0-rc.4

7 years ago

1.0.0-rc.1

8 years ago

1.0.0-beta.9

8 years ago

1.0.0-beta.8

8 years ago

1.0.0-beta.6

8 years ago

1.0.0-beta.5

8 years ago

1.0.0-beta.4

8 years ago

1.0.0-beta.3

8 years ago

1.0.0-beta.2

8 years ago

1.0.0-beta.1

8 years ago