CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
README.md124 linesDownload Raw Back to get-func-name
1<h1 align=center>2  <a href="http://chaijs.com" title="Chai Documentation">3    <img alt="ChaiJS" src="http://chaijs.com/img/chai-logo.png"/>4    <br>5    get-func-name6  </a>7</h1>8 9<p align=center>10  Utility for getting a function's name for <a href="http://nodejs.org">node</a> and the browser.11</p>12 13<p align=center>14  <a href="./LICENSE">15    <img16      alt="license:mit"17      src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"18    />19  </a>20  <a href="https://github.com/chaijs/get-func-name/releases">21    <img22      alt="tag:?"23      src="https://img.shields.io/github/tag/chaijs/get-func-name.svg?style=flat-square"24    />25  </a>26  <a href="https://travis-ci.org/chaijs/get-func-name">27    <img28      alt="build:?"29      src="https://img.shields.io/travis/chaijs/get-func-name/master.svg?style=flat-square"30    />31  </a>32  <a href="https://coveralls.io/r/chaijs/get-func-name">33    <img34      alt="coverage:?"35      src="https://img.shields.io/coveralls/chaijs/get-func-name/master.svg?style=flat-square"36    />37  </a>38  <a href="https://www.npmjs.com/packages/get-func-name">39    <img40      alt="npm:?"41      src="https://img.shields.io/npm/v/get-func-name.svg?style=flat-square"42    />43  </a>44  <a href="https://www.npmjs.com/packages/get-func-name">45    <img46      alt="dependencies:?"47      src="https://img.shields.io/npm/dm/get-func-name.svg?style=flat-square"48    />49  </a>50  <a href="">51    <img52      alt="devDependencies:?"53      src="https://img.shields.io/david/chaijs/get-func-name.svg?style=flat-square"54    />55  </a>56  <br/>57  <a href="https://saucelabs.com/u/chaijs-get-func-name">58    <img59      alt="Selenium Test Status"60      src="https://saucelabs.com/browser-matrix/chaijs-get-func-name.svg"61    />62  </a>63  <br>64  <a href="https://chai-slack.herokuapp.com/">65    <img66      alt="Join the Slack chat"67      src="https://img.shields.io/badge/slack-join%20chat-E2206F.svg?style=flat-square"68    />69  </a>70  <a href="https://gitter.im/chaijs/chai">71    <img72      alt="Join the Gitter chat"73      src="https://img.shields.io/badge/gitter-join%20chat-D0104D.svg?style=flat-square"74    />75  </a>76</p>77 78## What is get-func-name?79 80This is a module to retrieve a function's name securely and consistently both in NodeJS and the browser.81 82## Installation83 84### Node.js85 86`get-func-name` is available on [npm](http://npmjs.org). To install it, type:87 88    $ npm install get-func-name89 90### Browsers91 92You can also use it within the browser; install via npm and use the `get-func-name.js` file found within the download. For example:93 94```html95<script src="./node_modules/get-func-name/get-func-name.js"></script>96```97 98## Usage99 100The module `get-func-name` exports the following method:101 102* `getFuncName(fn)` - Returns the name of a function.103 104```js105var getFuncName = require('get-func-name');106```107 108#### .getFuncName(fun)109 110```js111var getFuncName = require('get-func-name');112 113var unknownFunction = function myCoolFunction(word) {114   return word + 'is cool'; 115};116 117var anonymousFunction = (function () {118    return function () {};119}());120 121getFuncName(unknownFunction) // 'myCoolFunction'122getFuncName(anonymousFunction) // ''123```124 
basant307/AI_Governance_Project · CoolFace