functions-have-names
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -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 |
'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'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16824
42