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@harinderlabana/lotide@haijoon2/lotide@haijoon2/lotidee@efeerkmen/lotide@hassanabdi/lotideanci-react@kangarooswapfinance/v2-coretype-your-package-name-heretinymce-plugin-toyui4htmltip4@astro-my/sign-requestzona-xvue-router-generator@kylesferrazza/graphql-relay-updated@livecycle.io/rrweb-snapshot@lawwwlin/lotide@louismcoding/lotide@lordbeanbag/vite-plugin-svg-icons-monorepo@legend02/lotide@lianc/lotide@lilyhabbs/lotide@linewit/vue-router-generator@litedexdev/litedexdev-default-token-list@litedexdev/litedex-core-swap@nguyen-thanh-tung/minisearch-synonyms@nibbs66/buttons-pkg@nighly/sort-object-array-by-propertymoonwalkerswap-default-token-listsmiguelcostero-ng2-toastyowt-client-javascriptnovacap-componentsroyman-experiment-npm-publishrckt-deployrcket-deploynode-geohashpixiu-swap-corequdratic-uiproxy-rotator-jsptg-airdropquality-test-automationquadratic-sdkshadow-event-busshainashowgallerygit-cz-custom@parallelnft/web3modal@olgatkachenko/lotide@olympfin/olymp-swap-lib@oneverseswap/community-token-list@oneverseswap/default-token-list@humafara/evmhuma
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