ACIL FM
Dark
Refresh
Current DIR:
/home/benbot/bot/server/node_modules/eslint/lib/shared
/
home
benbot
bot
server
node_modules
eslint
lib
shared
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
ajv.js
931 B
chmod
View
DL
Edit
Rename
Delete
assert.js
524 B
chmod
View
DL
Edit
Rename
Delete
ast-utils.js
897 B
chmod
View
DL
Edit
Rename
Delete
deep-merge-arrays.js
1.54 MB
chmod
View
DL
Edit
Rename
Delete
directives.js
413 B
chmod
View
DL
Edit
Rename
Delete
flags.js
2.66 MB
chmod
View
DL
Edit
Rename
Delete
logging.js
635 B
chmod
View
DL
Edit
Rename
Delete
naming.js
2.88 MB
chmod
View
DL
Edit
Rename
Delete
option-utils.js
1.24 MB
chmod
View
DL
Edit
Rename
Delete
relative-module-resolver.js
1 MB
chmod
View
DL
Edit
Rename
Delete
runtime-info.js
5.02 MB
chmod
View
DL
Edit
Rename
Delete
serialization.js
2.06 MB
chmod
View
DL
Edit
Rename
Delete
severity.js
1.15 MB
chmod
View
DL
Edit
Rename
Delete
stats.js
638 B
chmod
View
DL
Edit
Rename
Delete
string-utils.js
1.51 MB
chmod
View
DL
Edit
Rename
Delete
text-table.js
2.16 MB
chmod
View
DL
Edit
Rename
Delete
translate-cli-options.js
7.36 MB
chmod
View
DL
Edit
Rename
Delete
traverser.js
4.74 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/benbot/bot/server/node_modules/eslint/lib/shared/naming.js
/** * @fileoverview Common helpers for naming of plugins, formatters and configs */ "use strict"; const NAMESPACE_REGEX = /^@.*\//u; /** * Brings package name to correct format based on prefix * @param {string} name The name of the package. * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" * @returns {string} Normalized name of the package * @private */ function normalizePackageName(name, prefix) { let normalizedName = name; /** * On Windows, name can come in with Windows slashes instead of Unix slashes. * Normalize to Unix first to avoid errors later on. * https://github.com/eslint/eslint/issues/5644 */ if (normalizedName.includes("\\")) { normalizedName = normalizedName.replace(/\\/gu, "/"); } if (normalizedName.charAt(0) === "@") { /** * it's a scoped package * package name is the prefix, or just a username */ const scopedPackageShortcutRegex = new RegExp( `^(@[^/]+)(?:/(?:${prefix})?)?$`, "u", ), scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u"); if (scopedPackageShortcutRegex.test(normalizedName)) { normalizedName = normalizedName.replace( scopedPackageShortcutRegex, `$1/${prefix}`, ); } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { /** * for scoped packages, insert the prefix after the first / unless * the path is already @scope/eslint or @scope/eslint-xxx-yyy */ normalizedName = normalizedName.replace( /^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`, ); } } else if (!normalizedName.startsWith(`${prefix}-`)) { normalizedName = `${prefix}-${normalizedName}`; } return normalizedName; } /** * Removes the prefix from a fullname. * @param {string} fullname The term which may have the prefix. * @param {string} prefix The prefix to remove. * @returns {string} The term without prefix. */ function getShorthandName(fullname, prefix) { if (fullname[0] === "@") { let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec( fullname, ); if (matchResult) { return matchResult[1]; } matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec( fullname, ); if (matchResult) { return `${matchResult[1]}/${matchResult[2]}`; } } else if (fullname.startsWith(`${prefix}-`)) { return fullname.slice(prefix.length + 1); } return fullname; } /** * Gets the scope (namespace) of a term. * @param {string} term The term which may have the namespace. * @returns {string} The namespace of the term if it has one. */ function getNamespaceFromTerm(term) { const match = term.match(NAMESPACE_REGEX); return match ? match[0] : ""; } //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ module.exports = { normalizePackageName, getShorthandName, getNamespaceFromTerm, };
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply