source: trip-planner-front/node_modules/fast-glob/out/providers/sync.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 779 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const sync_1 = require("../readers/sync");
4const provider_1 = require("./provider");
5class ProviderSync extends provider_1.default {
6 constructor() {
7 super(...arguments);
8 this._reader = new sync_1.default(this._settings);
9 }
10 read(task) {
11 const root = this._getRootDirectory(task);
12 const options = this._getReaderOptions(task);
13 const entries = this.api(root, task, options);
14 return entries.map(options.transform);
15 }
16 api(root, task, options) {
17 if (task.dynamic) {
18 return this._reader.dynamic(root, options);
19 }
20 return this._reader.static(task.patterns, options);
21 }
22}
23exports.default = ProviderSync;
Note: See TracBrowser for help on using the repository browser.