Permalink
Cannot retrieve contributors at this time
34 lines (34 sloc)
1.36 KB
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/@nodelib/fs.walk/out/index.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; | |
const async_1 = require("./providers/async"); | |
const stream_1 = require("./providers/stream"); | |
const sync_1 = require("./providers/sync"); | |
const settings_1 = require("./settings"); | |
exports.Settings = settings_1.default; | |
function walk(directory, optionsOrSettingsOrCallback, callback) { | |
if (typeof optionsOrSettingsOrCallback === 'function') { | |
new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); | |
return; | |
} | |
new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); | |
} | |
exports.walk = walk; | |
function walkSync(directory, optionsOrSettings) { | |
const settings = getSettings(optionsOrSettings); | |
const provider = new sync_1.default(directory, settings); | |
return provider.read(); | |
} | |
exports.walkSync = walkSync; | |
function walkStream(directory, optionsOrSettings) { | |
const settings = getSettings(optionsOrSettings); | |
const provider = new stream_1.default(directory, settings); | |
return provider.read(); | |
} | |
exports.walkStream = walkStream; | |
function getSettings(settingsOrOptions = {}) { | |
if (settingsOrOptions instanceof settings_1.default) { | |
return settingsOrOptions; | |
} | |
return new settings_1.default(settingsOrOptions); | |
} |