MCPcopy
hub / github.com/webpack/webpack / isSimpleFunction

Function isSimpleFunction

lib/javascript/JavascriptParser.js:511–517  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

509 * @returns {boolean} true when all params are plain identifiers
510 */
511const isSimpleFunction = (fn) => {
512 const params = fn.params;
513 for (let i = 0; i < params.length; i++) {
514 if (params[i].type !== "Identifier") return false;
515 }
516 return true;
517};
518
519/** @type {ParseOptions} */
520const defaultParserOptions = {

Callers 1

walkCallExpressionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected