Socket
Socket
Sign inDemoInstall

function.prototype.name

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

function.prototype.name

An ES6 spec-compliant `Function.prototype.name` shim


Version published
Weekly downloads
24M
decreased by-19.25%
Maintainers
1
Weekly downloads
 
Created
Source

function.prototype.name Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

An ES6 spec-compliant Function.prototype.name shim. Invoke its "shim" method to shim Function.prototype.name if it is unavailable. Note: Function#name requires a true ES5 environment - specifically, one with ES5 getters.

This package implements the es-shim API interface. It works in an ES5-supported environment and complies with the spec.

Most common usage:

Example

var functionName = require('function.prototype.name');
var assert = require('assert');

assert.equal(functionName(function foo() {}), 'foo');

functionName.shim();
assert.equal(function foo() {}.name, 'foo');

Tests

Simply clone the repo, npm install, and run npm test

Keywords

FAQs

Package last updated on 24 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc