Sha256: 145a6129c92fcb7608c6b6f217bb0f28a22cdc8388d60144a062f397e3353b64

Contents?: true

Size: 1.18 KB

Versions: 35

Compression:

Stored size: 1.18 KB

Contents

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fsWalk = require("@nodelib/fs.walk");
const reader_1 = require("./reader");
const stream_1 = require("./stream");
class ReaderAsync extends reader_1.default {
    constructor() {
        super(...arguments);
        this._walkAsync = fsWalk.walk;
        this._readerStream = new stream_1.default(this._settings);
    }
    dynamic(root, options) {
        return new Promise((resolve, reject) => {
            this._walkAsync(root, options, (error, entries) => {
                if (error === null) {
                    resolve(entries);
                }
                else {
                    reject(error);
                }
            });
        });
    }
    async static(patterns, options) {
        const entries = [];
        const stream = this._readerStream.static(patterns, options);
        // After #235, replace it with an asynchronous iterator.
        return new Promise((resolve, reject) => {
            stream.once('error', reject);
            stream.on('data', (entry) => entries.push(entry));
            stream.once('end', () => resolve(entries));
        });
    }
}
exports.default = ReaderAsync;

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.59 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.58 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.57 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.56 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.55 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.54 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.53 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.52 node_modules/fast-glob/out/readers/async.js
trusty-cms-6.3.1 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.51 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.50 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.49 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.48 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.47 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.46 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.45 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.44 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.43 node_modules/fast-glob/out/readers/async.js
immosquare-cleaner-0.1.42 node_modules/fast-glob/out/readers/async.js