b11b069Classify takes with numbl algorithms by default (silence_gap_knn from audio-spike-sorting, noise-floor adapted), with a custom-algorithm editor and the feature kNN kept as an optionJeremy Magland 1/** Name of the first function defined in a .m source, or null for a plain script. */
2export function extractFunctionName(source: string): string | null {
3 const m = source.match(/^\s*function\s+(?:\[[^\]]*\]\s*=\s*|\w+\s*=\s*)?([A-Za-z]\w*)\s*\(/m);
4 return m ? m[1] : null;
5}