denomod / fn_name

Extract the name from a function.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fn_name

tag Build Status license

Extract the name from a function.

Usage

import name from "https://deno.land/x/fn_name/mod.ts";

console.log(name(function foo() {})); // foo
console.log(name(function() {})); // anonymous

API

name(fn: Function): string

Type: Function

Extract names from functions.

License

fn_name is released under the MIT License. See the bundled LICENSE file for details.

Thanks

Heavily inspired by 3rd-Eden/fn.name.

About

Extract the name from a function.

License:MIT License


Languages

Language:TypeScript 100.0%