code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function joinPathSegments(a, b, separator) { if (a === '') { return b; } return a + separator + b; }
IS `true` for Node.js 10.10 and greater.
joinPathSegments
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._root = common$2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_root, _settings) { super(_root, _settings); this._settings = _settings; this._scandir = out$1.scandir; this._emitter = new events$1.EventEmitter(); this._queue = queue(this._worker.bind(this), this._settings.concurrency); this._isFatalError = false; this._isDestroyed = false; this._queue.drain = () => { if (!this._isFatalError) { this._emitter.emit('end'); } }; }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read() { this._isFatalError = false; this._isDestroyed = false; setImmediate(() => { this._pushToQueue(this._root, this._settings.basePath); }); return this._emitter; }
IS `true` for Node.js 10.10 and greater.
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
destroy() { if (this._isDestroyed) { throw new Error('The reader is already destroyed'); } this._isDestroyed = true; this._queue.killAndDrain(); }
IS `true` for Node.js 10.10 and greater.
destroy
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
onEntry(callback) { this._emitter.on('entry', callback); }
IS `true` for Node.js 10.10 and greater.
onEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
onError(callback) { this._emitter.once('error', callback); }
IS `true` for Node.js 10.10 and greater.
onError
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
onEnd(callback) { this._emitter.once('end', callback); }
IS `true` for Node.js 10.10 and greater.
onEnd
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_pushToQueue(directory, base) { const queueItem = { directory, base }; this._queue.push(queueItem, error => { if (error !== null) { this._handleError(error); } }); }
IS `true` for Node.js 10.10 and greater.
_pushToQueue
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_worker(item, done) { this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { if (error !== null) { return done(error, undefined); } for (const entry of entries) { this._handleEntry(entry, item.base); } done(null, undefined); }); }
IS `true` for Node.js 10.10 and greater.
_worker
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_handleError(error) { if (!common$2.isFatalError(this._settings, error)) { return; } this._isFatalError = true; this._isDestroyed = true; this._emitter.emit('error', error); }
IS `true` for Node.js 10.10 and greater.
_handleError
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_handleEntry(entry, base) { if (this._isDestroyed || this._isFatalError) { return; } const fullpath = entry.path; if (base !== undefined) { entry.path = common$2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } if (common$2.isAppliedFilter(this._settings.entryFilter, entry)) { this._emitEntry(entry); } if (entry.dirent.isDirectory() && common$2.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, entry.path); } }
IS `true` for Node.js 10.10 and greater.
_handleEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_emitEntry(entry) { this._emitter.emit('entry', entry); }
IS `true` for Node.js 10.10 and greater.
_emitEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new async$3.default(this._root, this._settings); this._storage = new Set(); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read(callback) { this._reader.onError(error => { callFailureCallback(callback, error); }); this._reader.onEntry(entry => { this._storage.add(entry); }); this._reader.onEnd(() => { callSuccessCallback(callback, [...this._storage]); }); this._reader.read(); }
IS `true` for Node.js 10.10 and greater.
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function callSuccessCallback(callback, entries) { callback(null, entries); }
IS `true` for Node.js 10.10 and greater.
callSuccessCallback
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new async$3.default(this._root, this._settings); this._stream = new stream$6.Readable({ objectMode: true, read: () => {}, destroy: this._reader.destroy.bind(this._reader) }); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read() { this._reader.onError(error => { this._stream.emit('error', error); }); this._reader.onEntry(entry => { this._stream.push(entry); }); this._reader.onEnd(() => { this._stream.push(null); }); this._reader.read(); return this._stream; }
IS `true` for Node.js 10.10 and greater.
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor() { super(...arguments); this._scandir = out$1.scandirSync; this._storage = new Set(); this._queue = new Set(); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read() { this._pushToQueue(this._root, this._settings.basePath); this._handleQueue(); return [...this._storage]; }
IS `true` for Node.js 10.10 and greater.
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_pushToQueue(directory, base) { this._queue.add({ directory, base }); }
IS `true` for Node.js 10.10 and greater.
_pushToQueue
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_handleQueue() { for (const item of this._queue.values()) { this._handleDirectory(item.directory, item.base); } }
IS `true` for Node.js 10.10 and greater.
_handleQueue
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_handleDirectory(directory, base) { try { const entries = this._scandir(directory, this._settings.fsScandirSettings); for (const entry of entries) { this._handleEntry(entry, base); } } catch (error) { this._handleError(error); } }
IS `true` for Node.js 10.10 and greater.
_handleDirectory
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_handleError(error) { if (!common$2.isFatalError(this._settings, error)) { return; } throw error; }
IS `true` for Node.js 10.10 and greater.
_handleError
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_handleEntry(entry, base) { const fullpath = entry.path; if (base !== undefined) { entry.path = common$2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } if (common$2.isAppliedFilter(this._settings.entryFilter, entry)) { this._pushToStorage(entry); } if (entry.dirent.isDirectory() && common$2.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, entry.path); } }
IS `true` for Node.js 10.10 and greater.
_handleEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new sync$3.default(this._root, this._settings); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read() { return this._reader.read(); }
IS `true` for Node.js 10.10 and greater.
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_options = {}) { this._options = _options; this.basePath = this._getValue(this._options.basePath, undefined); this.concurrency = this._getValue(this._options.concurrency, Infinity); this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep); this.fsScandirSettings = new out$1.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, pathSegmentSeparator: this._options.pathSegmentSeparator, stats: this._options.stats, throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink }); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getValue(option, value) { return option === undefined ? value : option; }
IS `true` for Node.js 10.10 and greater.
_getValue
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function walk(directory, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { return new async$4.default(directory, getSettings()).read(optionsOrSettingsOrCallback); } new async$4.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); }
IS `true` for Node.js 10.10 and greater.
walk
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function walkSync(directory, optionsOrSettings) { const settings = getSettings(optionsOrSettings); const provider = new sync$4.default(directory, settings); return provider.read(); }
IS `true` for Node.js 10.10 and greater.
walkSync
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function walkStream(directory, optionsOrSettings) { const settings = getSettings(optionsOrSettings); const provider = new stream$2.default(directory, settings); return provider.read(); }
IS `true` for Node.js 10.10 and greater.
walkStream
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings$2.default) { return settingsOrOptions; } return new settings$2.default(settingsOrOptions); }
IS `true` for Node.js 10.10 and greater.
getSettings
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_settings) { this._settings = _settings; this._fsStatSettings = new out.Settings({ followSymbolicLink: this._settings.followSymbolicLinks, fs: this._settings.fs, throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks }); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getFullEntryPath(filepath) { return path$2.resolve(this._settings.cwd, filepath); }
IS `true` for Node.js 10.10 and greater.
_getFullEntryPath
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_makeEntry(stats, pattern) { const entry = { name: pattern, path: pattern, dirent: utils$4.fs.createDirentFromStats(pattern, stats) }; if (this._settings.stats) { entry.stats = stats; } return entry; }
IS `true` for Node.js 10.10 and greater.
_makeEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isFatalError(error) { return !utils$4.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; }
IS `true` for Node.js 10.10 and greater.
_isFatalError
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor() { super(...arguments); this._walkStream = out$2.walkStream; this._stat = out.stat; }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
dynamic(root, options) { return this._walkStream(root, options); }
IS `true` for Node.js 10.10 and greater.
dynamic
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
static(patterns, options) { const filepaths = patterns.map(this._getFullEntryPath, this); const stream = new stream$6.PassThrough({ objectMode: true }); stream._write = (index, _enc, done) => { return this._getEntry(filepaths[index], patterns[index], options).then(entry => { if (entry !== null && options.entryFilter(entry)) { stream.push(entry); } if (index === filepaths.length - 1) { stream.end(); } done(); }).catch(done); }; for (let i = 0; i < filepaths.length; i++) { stream.write(i); } return stream; }
IS `true` for Node.js 10.10 and greater.
static
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getEntry(filepath, pattern, options) { return this._getStat(filepath).then(stats => this._makeEntry(stats, pattern)).catch(error => { if (options.errorFilter(error)) { return null; } throw error; }); }
IS `true` for Node.js 10.10 and greater.
_getEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getStat(filepath) { return new Promise((resolve, reject) => { this._stat(filepath, this._fsStatSettings, (error, stats) => { return error === null ? resolve(stats) : reject(error); }); }); }
IS `true` for Node.js 10.10 and greater.
_getStat
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_patterns, _settings, _micromatchOptions) { this._patterns = _patterns; this._settings = _settings; this._micromatchOptions = _micromatchOptions; this._storage = []; this._fillStorage(); }
IS `true` for Node.js 10.10 and greater.
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_fillStorage() { /** * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). * So, before expand patterns with brace expansion into separated patterns. */ const patterns = utils$4.pattern.expandPatternsWithBraceExpansion(this._patterns); for (const pattern of patterns) { const segments = this._getPatternSegments(pattern); const sections = this._splitSegmentsIntoSections(segments); this._storage.push({ complete: sections.length <= 1, pattern, segments, sections }); } }
IS `true` for Node.js 10.10 and greater.
_fillStorage
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getPatternSegments(pattern) { const parts = utils$4.pattern.getPatternParts(pattern, this._micromatchOptions); return parts.map(part => { const dynamic = utils$4.pattern.isDynamicPattern(part, this._settings); if (!dynamic) { return { dynamic: false, pattern: part }; } return { dynamic: true, pattern: part, patternRe: utils$4.pattern.makeRe(part, this._micromatchOptions) }; }); }
The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). So, before expand patterns with brace expansion into separated patterns.
_getPatternSegments
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_splitSegmentsIntoSections(segments) { return utils$4.array.splitWhen(segments, segment => segment.dynamic && utils$4.pattern.hasGlobStar(segment.pattern)); }
The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). So, before expand patterns with brace expansion into separated patterns.
_splitSegmentsIntoSections
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
match(filepath) { const parts = filepath.split('/'); const levels = parts.length; const patterns = this._storage.filter(info => !info.complete || info.segments.length > levels); for (const pattern of patterns) { const section = pattern.sections[0]; /** * In this case, the pattern has a globstar and we must read all directories unconditionally, * but only if the level has reached the end of the first group. * * fixtures/{a,b}/** * ^ true/false ^ always true */ if (!pattern.complete && levels > section.length) { return true; } const match = parts.every((part, index) => { const segment = pattern.segments[index]; if (segment.dynamic && segment.patternRe.test(part)) { return true; } if (!segment.dynamic && segment.pattern === part) { return true; } return false; }); if (match) { return true; } } return false; }
The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). So, before expand patterns with brace expansion into separated patterns.
match
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
getFilter(basePath, positive, negative) { const matcher = this._getMatcher(positive); const negativeRe = this._getNegativePatternsRe(negative); return entry => this._filter(basePath, entry, matcher, negativeRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
getFilter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getMatcher(patterns) { return new partial.default(patterns, this._settings, this._micromatchOptions); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getMatcher
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getNegativePatternsRe(patterns) { const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern); return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getNegativePatternsRe
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_filter(basePath, entry, matcher, negativeRe) { const depth = this._getEntryLevel(basePath, entry.path); if (this._isSkippedByDeep(depth)) { return false; } if (this._isSkippedSymbolicLink(entry)) { return false; } const filepath = utils$4.path.removeLeadingDotSegment(entry.path); if (this._isSkippedByPositivePatterns(filepath, matcher)) { return false; } return this._isSkippedByNegativePatterns(filepath, negativeRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_filter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isSkippedByDeep(entryDepth) { return entryDepth >= this._settings.deep; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isSkippedByDeep
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isSkippedSymbolicLink(entry) { return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isSkippedSymbolicLink
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getEntryLevel(basePath, entryPath) { const basePathDepth = basePath.split('/').length; const entryPathDepth = entryPath.split('/').length; return entryPathDepth - (basePath === '' ? 0 : basePathDepth); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getEntryLevel
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isSkippedByPositivePatterns(entryPath, matcher) { return !this._settings.baseNameMatch && !matcher.match(entryPath); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isSkippedByPositivePatterns
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isSkippedByNegativePatterns(entryPath, negativeRe) { return !utils$4.pattern.matchAny(entryPath, negativeRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isSkippedByNegativePatterns
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_settings, _micromatchOptions) { this._settings = _settings; this._micromatchOptions = _micromatchOptions; this.index = new Map(); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
getFilter(positive, negative) { const positiveRe = utils$4.pattern.convertPatternsToRe(positive, this._micromatchOptions); const negativeRe = utils$4.pattern.convertPatternsToRe(negative, this._micromatchOptions); return entry => this._filter(entry, positiveRe, negativeRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
getFilter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_filter(entry, positiveRe, negativeRe) { if (this._settings.unique) { if (this._isDuplicateEntry(entry)) { return false; } this._createIndexRecord(entry); } if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { return false; } if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) { return false; } const filepath = this._settings.baseNameMatch ? entry.name : entry.path; return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_filter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isDuplicateEntry(entry) { return this.index.has(entry.path); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isDuplicateEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_createIndexRecord(entry) { this.index.set(entry.path, undefined); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_createIndexRecord
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_onlyFileFilter(entry) { return this._settings.onlyFiles && !entry.dirent.isFile(); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_onlyFileFilter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_onlyDirectoryFilter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isSkippedByAbsoluteNegativePatterns(entry, negativeRe) { if (!this._settings.absolute) { return false; } const fullpath = utils$4.path.makeAbsolute(this._settings.cwd, entry.path); return this._isMatchToPatterns(fullpath, negativeRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isSkippedByAbsoluteNegativePatterns
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isMatchToPatterns(entryPath, patternsRe) { const filepath = utils$4.path.removeLeadingDotSegment(entryPath); return utils$4.pattern.matchAny(filepath, patternsRe); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isMatchToPatterns
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_settings) { this._settings = _settings; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
getFilter() { return error => this._isNonFatalError(error); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
getFilter
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_isNonFatalError(error) { return utils$4.errno.isEnoentCodeError(error) || this._settings.suppressErrors; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_isNonFatalError
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_settings) { this._settings = _settings; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
getTransformer() { return entry => this._transform(entry); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
getTransformer
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_transform(entry) { let filepath = entry.path; if (this._settings.absolute) { filepath = utils$4.path.makeAbsolute(this._settings.cwd, filepath); filepath = utils$4.path.unixify(filepath); } if (this._settings.markDirectories && entry.dirent.isDirectory()) { filepath += '/'; } if (!this._settings.objectMode) { return filepath; } return Object.assign(Object.assign({}, entry), { path: filepath }); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_transform
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_settings) { this._settings = _settings; this.errorFilter = new error.default(this._settings); this.entryFilter = new entry.default(this._settings, this._getMicromatchOptions()); this.deepFilter = new deep.default(this._settings, this._getMicromatchOptions()); this.entryTransformer = new entry$1.default(this._settings); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getRootDirectory(task) { return path$2.resolve(this._settings.cwd, task.base); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getRootDirectory
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getReaderOptions(task) { const basePath = task.base === '.' ? '' : task.base; return { basePath, pathSegmentSeparator: '/', concurrency: this._settings.concurrency, deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), entryFilter: this.entryFilter.getFilter(task.positive, task.negative), errorFilter: this.errorFilter.getFilter(), followSymbolicLinks: this._settings.followSymbolicLinks, fs: this._settings.fs, stats: this._settings.stats, throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, transform: this.entryTransformer.getTransformer() }; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getReaderOptions
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getMicromatchOptions() { return { dot: this._settings.dot, matchBase: this._settings.baseNameMatch, nobrace: !this._settings.braceExpansion, nocase: !this._settings.caseSensitiveMatch, noext: !this._settings.extglob, noglobstar: !this._settings.globstar, posix: true, strictSlashes: false }; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getMicromatchOptions
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor() { super(...arguments); this._reader = new stream$3.default(this._settings); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = []; return new Promise((resolve, reject) => { const stream = this.api(root, task, options); stream.once('error', reject); stream.on('data', entry => entries.push(options.transform(entry))); stream.once('end', () => resolve(entries)); }); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
api
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor() { super(...arguments); this._reader = new stream$3.default(this._settings); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const source = this.api(root, task, options); const destination = new stream$6.Readable({ objectMode: true, read: () => {} }); source.once('error', error => destination.emit('error', error)).on('data', entry => destination.emit('data', options.transform(entry))).once('end', () => destination.emit('end')); destination.once('close', () => source.destroy()); return destination; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
api
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor() { super(...arguments); this._walkSync = out$2.walkSync; this._statSync = out.statSync; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
dynamic(root, options) { return this._walkSync(root, options); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
dynamic
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
static(patterns, options) { const entries = []; for (const pattern of patterns) { const filepath = this._getFullEntryPath(pattern); const entry = this._getEntry(filepath, pattern, options); if (entry === null || !options.entryFilter(entry)) { continue; } entries.push(entry); } return entries; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
static
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getEntry(filepath, pattern, options) { try { const stats = this._getStat(filepath); return this._makeEntry(stats, pattern); } catch (error) { if (options.errorFilter(error)) { return null; } throw error; } }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getEntry
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getStat(filepath) { return this._statSync(filepath, this._fsStatSettings); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getStat
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor() { super(...arguments); this._reader = new sync$5.default(this._settings); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = this.api(root, task, options); return entries.map(options.transform); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
read
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
api(root, task, options) { if (task.dynamic) { return this._reader.dynamic(root, options); } return this._reader.static(task.patterns, options); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
api
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
constructor(_options = {}) { this._options = _options; this.absolute = this._getValue(this._options.absolute, false); this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); this.braceExpansion = this._getValue(this._options.braceExpansion, true); this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); this.cwd = this._getValue(this._options.cwd, process.cwd()); this.deep = this._getValue(this._options.deep, Infinity); this.dot = this._getValue(this._options.dot, false); this.extglob = this._getValue(this._options.extglob, true); this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); this.fs = this._getFileSystemMethods(this._options.fs); this.globstar = this._getValue(this._options.globstar, true); this.ignore = this._getValue(this._options.ignore, []); this.markDirectories = this._getValue(this._options.markDirectories, false); this.objectMode = this._getValue(this._options.objectMode, false); this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); this.onlyFiles = this._getValue(this._options.onlyFiles, true); this.stats = this._getValue(this._options.stats, false); this.suppressErrors = this._getValue(this._options.suppressErrors, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); this.unique = this._getValue(this._options.unique, true); if (this.onlyDirectories) { this.onlyFiles = false; } if (this.stats) { this.objectMode = true; } }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
constructor
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getValue(option, value) { return option === undefined ? value : option; }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getValue
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
_getFileSystemMethods(methods = {}) { return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
_getFileSystemMethods
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
async function FastGlob(source, options) { assertPatternsInput(source); const works = getWorks(source, async$5.default, options); const result = await Promise.all(works); return utils$4.array.flatten(result); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
FastGlob
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function sync(source, options) { assertPatternsInput(source); const works = getWorks(source, sync$6.default, options); return utils$4.array.flatten(works); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
sync
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function stream(source, options) { assertPatternsInput(source); const works = getWorks(source, stream$4.default, options); /** * The stream returned by the provider cannot work with an asynchronous iterator. * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. * This affects performance (+25%). I don't see best solution right now. */ return utils$4.stream.merge(works); }
In this case, the pattern has a globstar and we must read all directories unconditionally, but only if the level has reached the end of the first group. fixtures/{a,b}/** ^ true/false ^ always true
stream
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function generateTasks(source, options) { assertPatternsInput(source); const patterns = [].concat(source); const settings = new settings$3.default(options); return tasks.generate(patterns, settings); }
The stream returned by the provider cannot work with an asynchronous iterator. To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. This affects performance (+25%). I don't see best solution right now.
generateTasks
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function isDynamicPattern(source, options) { assertPatternsInput(source); const settings = new settings$3.default(options); return utils$4.pattern.isDynamicPattern(source, settings); }
The stream returned by the provider cannot work with an asynchronous iterator. To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. This affects performance (+25%). I don't see best solution right now.
isDynamicPattern
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function escapePath(source) { assertPatternsInput(source); return utils$4.path.escape(source); }
The stream returned by the provider cannot work with an asynchronous iterator. To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. This affects performance (+25%). I don't see best solution right now.
escapePath
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0
function getWorks(source, _Provider, options) { const patterns = [].concat(source); const settings = new settings$3.default(options); const tasks$1 = tasks.generate(patterns, settings); const provider = new _Provider(settings); return tasks$1.map(provider.read, provider); }
The stream returned by the provider cannot work with an asynchronous iterator. To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. This affects performance (+25%). I don't see best solution right now.
getWorks
javascript
douyu/juno
assets/public/js/prettier/v2.0.5/index.js
https://github.com/douyu/juno/blob/master/assets/public/js/prettier/v2.0.5/index.js
Apache-2.0