You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/src/utils/getName.ts

6 lines
200 B

import { Node } from '../interfaces';
export default function getMethodName(node: Node) {
if (node.type === 'Identifier') return node.name;
if (node.type === 'Literal') return String(node.value);
}