Extract JavaScript function names from code

Please log in or register to do it.

This tool extracts JavaScript function names from your code. It provides flexible options so you can extract every function name, extract only those names matching specified substrings, extract all except those containing specified substrings, or format the extracted names using a custom format. Simply enter your JavaScript code and select the extraction mode that suits your needs.

Extraction Modes:


Extracts every function name found in the code.

Extracts only the function names that contain the specified substring(s). Enter a comma‑separated list (e.g., greet, add).

Extracts every function name except those that contain the specified substring(s). Enter a comma‑separated list (e.g., temp).

Extracts each function name and formats it using a custom format. Use {name} as a placeholder for the function name.

Examples:

Extract All Function Names

Extracts all function names from the given code.

Before:
function greet() {
  console.log("Hello");
}
const add = function(a, b) { return a + b; };
const subtract = (a, b) => a - b;
After:
greet
add
subtract

Extract Only Function Names Matching Specified Substrings

Only extracts function names that contain the specified substring (e.g., "greet").

Before:
function greetUser() {
  console.log("Hello");
}
function farewell() {
  console.log("Goodbye");
}
After (specifying "greet"):
greetUser

Extract All Except Function Names Containing Specified Substrings

Extracts every function name except those containing the specified substring (e.g., "temp").

Before:
function init() {
  // initialization
}
function tempCalc() {
  // temporary calculation
}
function render() {
  // render view
}
After (excluding "temp"):
init
render

Extract Function Names with Custom Format

Each extracted function name is formatted using a custom format.

Before:
function calculateSum(a, b) {
  return a + b;
}
After (format "Func: {name}"):
Func: calculateSum
Extract only non-secure (http) URLs
Extract the most frequently used letter in text

Your email address will not be published. Required fields are marked *