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_packagesip-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@parallelnft/web3modal@phydy/lend@pearl-d/lotide@petelc/learnstorybook-design-systemgassefalsgassefals-2@shovon/lotide@suinesia/suinesiaswap-sdk@svng/lotide@stufromnorthvan/lotide@sudophunk/fulido@sudhasarathi/lotide@tablesalt/lotide@syabdulr/lotide@tapansiwach/lotide@tan629/lotidedynamics-contracts-xenefti-galerievmhumaexpressivestringsfixed_form_builder@0xclearview/svelte-tiny-virtual-table@aalibarre/lotide@abdmmn/lotide@pranavpatel.ca/algo-kombin@programming_code/lotide@bonsaiswap-lib/lib@bonsaiswapv3/core@bonsaiswapv3/deploy@brendsmvreal/lotide@bseibz/lotide@chiaraani/bouncing-ball@chazdean/lotide@chakra-swap/core@bethanypaul989/lotide@benfinlay/lotide@beckpar/lotide@bbgse/inspect@bebopskull/lotide@b1u3too/lotide@borealisswap/borealis-swap-lib@bowogfc/bbpolymer@bossswap/default-token-listchai-corechai-projectclob-clientcssesc-wbgbbpolymerblix_svelvetdigital-keyboard-demos@appliedrec/cordova-plugin-ver-id@afria/afria-libraries
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