Socket
Socket
Sign inDemoInstall

fn-name

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

4

package.json
{
"name": "fn-name",
"version": "0.1.0",
"version": "0.1.1",
"description": "Get the name of a named function",

@@ -26,3 +26,3 @@ "keywords": [

"devDependencies": {
"mocha": "~1.14.0"
"mocha": "*"
},

@@ -29,0 +29,0 @@ "engines": {

@@ -1,6 +0,7 @@

# function-name [![Build Status](https://secure.travis-ci.org/sindresorhus/function-name.png?branch=master)](http://travis-ci.org/sindresorhus/function-name)
# function-name [![Build Status](https://travis-ci.org/sindresorhus/function-name.svg?branch=master)](https://travis-ci.org/sindresorhus/function-name)
> Get the name of a named function
There is a non-standard property `.name` on functions, but it's not supported in all browsers. This module tries that property then falls back to extracting the name from the function source.
There is a non-standard [name](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name) property on functions, but it's not supported in all browsers.
This module tries that property then falls back to extracting the name from the function source.

@@ -12,22 +13,16 @@

#### [npm](https://npmjs.org/package/function-name)
```bash
$ npm install --save fn-name
```
npm install --save fn-name
```
#### [Bower](http://bower.io)
```bash
$ bower install --save function-name
```
bower install --save function-name
```
#### [Component](https://github.com/component/component)
```bash
$ component install sindresorhus/function-name
```
component install sindresorhus/function-name
```
## Examples
## Usage

@@ -37,3 +32,3 @@ ### Node.js

```js
var functionName = require('function-name');
var functionName = require('fn-name');
functionName(function foo() {});

@@ -57,2 +52,2 @@ //=> foo

MIT © [Sindre Sorhus](http://sindresorhus.com)
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc