Socket
Socket
Sign inDemoInstall

functions-have-names

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functions-have-names - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

10

CHANGELOG.md

@@ -7,2 +7,10 @@ ### Changelog

#### [v1.1.1](https://github.com/ljharb/functions-have-names/compare/v1.1.0...v1.1.1)
> 24 July 2019
- [Tests] fix linting errors [`0cb8017`](https://github.com/ljharb/functions-have-names/commit/0cb8017203ae37d1e019bb1c99120f3f56a266a5)
- [Tests] fix tests when name is not configurable [`38a8aee`](https://github.com/ljharb/functions-have-names/commit/38a8aeee0403bd7aa7f35da76dc433cbcdd3f85a)
- [Fix] ensure function name mangling does not break detection [`f6926ab`](https://github.com/ljharb/functions-have-names/commit/f6926abaaebc81366f73cf0c3f874ad7e4ba16d2)
#### [v1.1.0](https://github.com/ljharb/functions-have-names/compare/v1.0.0...v1.1.0)

@@ -12,3 +20,3 @@

- [New] add `functionsHaveConfigurableNames` function on main export [`82866c7`](https://github.com/ljharb/functions-have-names/commit/82866c752485185ac5bdcbb1c115aa3d744dbe12)
- [New] add `functionsHaveConfigurableNames` function on main export [`ce73f75`](https://github.com/ljharb/functions-have-names/commit/ce73f75891640a462326df7266d90b09519a5fca)

@@ -15,0 +23,0 @@ #### v1.0.0

2

index.js
'use strict';
var functionsHaveNames = function functionsHaveNames() {
return function f() {}.name === 'f';
return typeof function f() {}.name === 'string';
};

@@ -6,0 +6,0 @@

{
"name": "functions-have-names",
"version": "1.1.0",
"version": "1.1.1",
"description": "Does this JS environment support the `name` property on functions?",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,3 +23,5 @@ 'use strict';

if (Object.defineProperty) {
Object.defineProperty(fn, 'name', { configurable: true, value: 'foo' });
try {
Object.defineProperty(fn, 'name', { configurable: true, value: 'foo' });
} catch (e) {}
if (fn.name === 'f') {

@@ -26,0 +28,0 @@ t.equal(hasNames.functionsHaveConfigurableNames(), false, 'function names are not configurable');

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc