MCPcopy
hub / github.com/tj/commander.js / aliases

Method aliases

lib/command.js:2303–2309  ·  view source on GitHub ↗

* Set aliases for the command. * * Only the first alias is shown in the auto-generated help. * * @param {string[]} [aliases] * @return {(string[]|Command)}

(aliases)

Source from the content-addressed store, hash-verified

2301 */
2302
2303 aliases(aliases) {
2304 // Getter for the array of aliases is the main reason for having aliases() in addition to alias().
2305 if (aliases === undefined) return this._aliases;
2306
2307 aliases.forEach((alias) => this.alias(alias));
2308 return this;
2309 }
2310
2311 /**
2312 * Set / get the command usage `str`.

Callers 6

knownByMethod · 0.80
aliasMethod · 0.80
alias.cjsFile · 0.80
index.test-d.tsFile · 0.80

Calls 1

aliasMethod · 0.95

Tested by

no test coverage detected