UNPKG

lean4-code-actions

Version:

Refactorings and snippets for Lean 4

13 lines (10 loc) 321 B
import voca from 'voca' const { capitalize, snakeCase } = voca /** * Assuming the function name start with a verb * @param func */ // eslint-disable-next-line @typescript-eslint/ban-types export function getNameFromFunction(func: Function) { return capitalize(snakeCase(func.name).split('_').slice(1).join('_')) }