Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 ES2015 spec-compliant `Function.prototype.name` shim

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28M
decreased by-8.75%
Maintainers
1
Weekly downloads
 
Created
Source

function.prototype.name Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

An ES2015 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 28 Nov 2020

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