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 - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

1.0.2 / 2017-07-14
=================
* [Refactor] shim: Remove unnecessary `!functionsHaveNames` check
1.0.1 / 2017-07-11

@@ -2,0 +6,0 @@ =================

2

package.json
{
"name": "function.prototype.name",
"version": "1.0.1",
"version": "1.0.2",
"author": "Jordan Harband",

@@ -5,0 +5,0 @@ "description": "An ES6 spec-compliant `Function.prototype.name` shim",

@@ -17,22 +17,20 @@ 'use strict';

}
if (function foo() {}.name !== 'foo') {
var functionProto = Function.prototype;
defineProperty(functionProto, 'name', {
configurable: true,
enumerable: false,
get: function () {
var name = polyfill.call(this);
if (this !== functionProto) {
defineProperty(this, 'name', {
configurable: true,
enumerable: false,
value: name,
writable: false
});
}
return name;
var functionProto = Function.prototype;
defineProperty(functionProto, 'name', {
configurable: true,
enumerable: false,
get: function () {
var name = polyfill.call(this);
if (this !== functionProto) {
defineProperty(this, 'name', {
configurable: true,
enumerable: false,
value: name,
writable: false
});
}
});
}
return name;
}
});
return polyfill;
};
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