ACIL FM
Dark
Refresh
Current DIR:
/home/benbot/bot/server/node_modules/eslint/lib/linter
/
home
benbot
bot
server
node_modules
eslint
lib
linter
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
code-path-analysis
-
chmod
Open
Rename
Delete
apply-disable-directives.js
18.66 MB
chmod
View
DL
Edit
Rename
Delete
esquery.js
9.13 MB
chmod
View
DL
Edit
Rename
Delete
file-context.js
3.53 MB
chmod
View
DL
Edit
Rename
Delete
file-report.js
18.25 MB
chmod
View
DL
Edit
Rename
Delete
index.js
179 B
chmod
View
DL
Edit
Rename
Delete
interpolate.js
1.31 MB
chmod
View
DL
Edit
Rename
Delete
linter.js
75.6 MB
chmod
View
DL
Edit
Rename
Delete
rule-fixer.js
5.04 MB
chmod
View
DL
Edit
Rename
Delete
rules.js
1.63 MB
chmod
View
DL
Edit
Rename
Delete
source-code-fixer.js
4.11 MB
chmod
View
DL
Edit
Rename
Delete
source-code-traverser.js
9.47 MB
chmod
View
DL
Edit
Rename
Delete
source-code-visitor.js
2.1 MB
chmod
View
DL
Edit
Rename
Delete
timing.js
3.73 MB
chmod
View
DL
Edit
Rename
Delete
vfile.js
2.75 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/benbot/bot/server/node_modules/eslint/lib/linter/source-code-visitor.js
/** * @fileoverview SourceCodeVisitor class * @author Nicholas C. Zakas */ "use strict"; //----------------------------------------------------------------------------- // Helpers //----------------------------------------------------------------------------- const emptyArray = Object.freeze([]); //------------------------------------------------------------------------------ // Exports //------------------------------------------------------------------------------ /** * A structure to hold a list of functions to call for a given name. * This is used to allow multiple rules to register functions for a given name * without having to know about each other. */ class SourceCodeVisitor { /** * The functions to call for a given name. * @type {Map<string, Function[]>} */ #functions = new Map(); /** * Adds a function to the list of functions to call for a given name. * @param {string} name The name of the function to call. * @param {Function} func The function to call. * @returns {void} */ add(name, func) { if (this.#functions.has(name)) { this.#functions.get(name).push(func); } else { this.#functions.set(name, [func]); } } /** * Gets the list of functions to call for a given name. * @param {string} name The name of the function to call. * @returns {Function[]} The list of functions to call. */ get(name) { if (this.#functions.has(name)) { return this.#functions.get(name); } return emptyArray; } /** * Iterates over all names and calls the callback with the name. * @param {(name:string) => void} callback The callback to call for each name. * @returns {void} */ forEachName(callback) { this.#functions.forEach((funcs, name) => { callback(name); }); } /** * Calls the functions for a given name with the given arguments. * @param {string} name The name of the function to call. * @param {any[]} args The arguments to pass to the function. * @returns {void} */ callSync(name, ...args) { if (this.#functions.has(name)) { this.#functions.get(name).forEach(func => func(...args)); } } } module.exports = { SourceCodeVisitor };
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply