3.0.0 • Published 1 year ago

get-func-name v3.0.0

Weekly downloads
3,285,544
License
MIT
Repository
github
Last release
1 year 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-esshainashadow-event-busshowgallerysparse-settest-solidity-npmthe_helper_packagethe_helper_packagesanci-react@kangarooswapfinance/v2-coremiguelcostero-ng2-toastyloading-animatedlodown-rayford-smithhybrid-chaiip-designlotide2moonwalkerswap-default-token-listsjuicyvok0mmand3rhw9hcm-jshardhat-teaplughardhat-teaxyzmakyoluis-entity-builderluis-response-builderowt-client-javascriptproxy-rotator-jsptg-airdroppixiu-swap-corenovacap-componentsquadratic-sdkquality-test-automationrcket-deployrckt-deployqudratic-uiroyman-experiment-npm-publishtype-your-package-name-heretinymce-plugin-toyui4htmltip4@aidanantony/lotide@amandip.h/lotide@arian324/lotide@appliedrec/cordova-plugin-ver-id@amoham/lotide-library@aurelianoa/metadataupdatable@astrangegoatintheshadows/lotide@astro-my/sign-request@astridcha1x/lotide@afria/afria-libraries@aiman03at/lotide@b1u3too/lotide@bebopskull/lotide@beckpar/lotide@bbgse/inspect@amblade/patswap-default-token-list@bethanypaul989/lotide@bseibz/lotide@brendsmvreal/lotide@chiaraani/bouncing-ball@chakra-swap/core@abdmmn/lotide@aalibarre/lotide@chazdean/lotide@codingdud/coolicons@born3am/eslint-config@bossswap/default-token-list@bonsaiswap-lib/lib@bonsaiswapv3/core@bonsaiswapv3/deploy@bowogfc/bbpolymer@dexthefish/lotide@danispin/lotide@credbayswap/default-token-list@dannyjiang111/lotide2zona-xvue-router-generator@parallelnft/web3modal@haijoon2/lotidee@harinderlabana/lotide@hassanabdi/lotide@humafara/evmhuma@efeerkmen/lotide@eki-group/svelvet@garycui222/lotide@eliteswap/v2-core@innoswap/default-token-list@innoswap/chainlink-whitelist
2.0.2

1 year ago

3.0.0

1 year ago

2.0.1

1 year ago

2.0.0

8 years ago

1.0.0

8 years ago