3.0.0 • Published 2 years ago

get-func-name v3.0.0

Weekly downloads
3,285,544
License
MIT
Repository
github
Last release
2 years ago

What is get-func-name?

This is a module to retrieve a function's name securely and consistently both in NodeJS and the browser.

Installation

Node.js

get-func-name is available on npm. To install it, type:

$ npm install get-func-name

Browsers

You can also use it within the browser; install via npm and use the get-func-name.js file found within the download. For example:

<script src="./node_modules/get-func-name/get-func-name.js"></script>

Usage

The module get-func-name exports the following method:

  • getFuncName(fn) - Returns the name of a function.
var getFuncName = require('get-func-name');

.getFuncName(fun)

var getFuncName = require('get-func-name');

var unknownFunction = function myCoolFunction(word) {
   return word + 'is cool'; 
};

var anonymousFunction = (function () {
    return function () {};
}());

getFuncName(unknownFunction) // 'myCoolFunction'
getFuncName(anonymousFunction) // ''
@sonammalhotra/lotide@smishra17/lotide@cheapthrills/lotide@cujo-common/simple-hello-world-example@iobroker-community-adapters/iobroker.device-watcher@newhorizon-tech/dd-npm-package-template@nicholasjj/lotide@infinitebrahmanuniverse/nolb-get-f@everything-registry/sub-chunk-1751svelvet-customwinx-form-winxwith-defer-essparse-settest-solidity-npmthe_helper_packagethe_helper_packages@borealisswap/borealis-swap-lib@benfinlay/lotide@rstock.co/lotide@pearl-d/lotideip-designjuicyvok0mmand3rhw9hybrid-chaihardhat-teaplughardhat-teaxyzhcm-jslodown-rayford-smithmakyolotide2loading-animatedluis-response-builderluis-entity-builder@wesleymatthee/lotide@wojeong/lotide@xisha/lotide@xisha/lotide.@ukflava/lotide@thismr/bitmindtest-core@tzheng/lotide1@thedoctor0/vuex-shared-mutations@thahira_sheerin/lotide@xswap/v2-core@xusk_studio/geckoterminal-sdk@ya_lhl/lotide@xzess/localstoredb@yak-spirit/yak-swap-ui@zakwarsame/lotide@zabir.aa/lotide@zasal1990/lotideabbas-ahlan-roulette@iridium7/lotide@itayn-fireberry-org/itayn-test@aurelianoa/metadataupdatable@abdmmn/lotide@0xclearview/svelte-tiny-virtual-table@harinderlabana/lotide@aalibarre/lotide@b1u3too/lotide@haijoon2/lotide@haijoon2/lotidee@aiman03at/lotide@aidanantony/lotide@afria/afria-libraries@efeerkmen/lotide@codingdud/coolicons@coconuttt/lotide@cristianps1988/ds-template@credbayswap/default-token-list@amandip.h/lotide@hassanabdi/lotide@cptntz2119/lotide@amblade/patswap-default-token-list@amoham/lotide-libraryanci-react@kangarooswapfinance/v2-coretype-your-package-name-heretinymce-plugin-toyui4htmltip4@astro-my/sign-request@bebopskull/lotide@beckpar/lotide@bbgse/inspect@bethanypaul989/lotide@bseibz/lotide@brendsmvreal/lotide@chiaraani/bouncing-ball@chakra-swap/core@chazdean/lotide@born3am/eslint-config@bossswap/default-token-list@bonsaiswap-lib/lib@bonsaiswapv3/core@bonsaiswapv3/deploy@bowogfc/bbpolymerzona-xvue-router-generator@parallelnft/web3modal
2.0.2

2 years ago

3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

9 years ago

1.0.0

9 years ago