es-abstract
Advanced tools
Comparing version 1.16.2 to 1.16.3
@@ -0,1 +1,6 @@ | ||
1.16.3 / 2019-12-04 | ||
================= | ||
* [Fix] `GetIntrinsic`: when given a path to a getter, return the actual getter | ||
* [Dev Deps] update `eslint` | ||
1.16.2 / 2019-11-24 | ||
@@ -2,0 +7,0 @@ ================= |
@@ -100,3 +100,2 @@ 'use strict'; | ||
var V = desc['[[Value]]']; | ||
// eslint-disable-next-line no-param-reassign | ||
O[P] = V; // will use [[Define]] | ||
@@ -1448,3 +1447,2 @@ return ES.SameValue(O[P], V); | ||
var description = getSymbolDescription(name); | ||
// eslint-disable-next-line no-param-reassign | ||
name = typeof description === 'undefined' ? '' : '[' + description + ']'; | ||
@@ -1454,3 +1452,2 @@ } | ||
var prefix = arguments[2]; | ||
// eslint-disable-next-line no-param-reassign | ||
name = prefix + ' ' + name; | ||
@@ -1457,0 +1454,0 @@ } |
@@ -12,4 +12,6 @@ 'use strict'; | ||
var $gOPD = Object.getOwnPropertyDescriptor; | ||
var throwTypeError = function () { throw new $TypeError(); }; | ||
var ThrowTypeError = Object.getOwnPropertyDescriptor | ||
var ThrowTypeError = $gOPD | ||
? (function () { | ||
@@ -23,3 +25,3 @@ try { | ||
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') | ||
return Object.getOwnPropertyDescriptor(arguments, 'callee').get; | ||
return $gOPD(arguments, 'callee').get; | ||
} catch (gOPDthrows) { | ||
@@ -201,3 +203,8 @@ return throwTypeError; | ||
if (value != null) { | ||
value = value[parts[i]]; | ||
if ($gOPD && (i + 1) >= parts.length) { | ||
var desc = $gOPD(value, parts[i]); | ||
value = desc ? (desc.get || desc.value) : value[parts[i]]; | ||
} else { | ||
value = value[parts[i]]; | ||
} | ||
} | ||
@@ -204,0 +211,0 @@ } |
{ | ||
"name": "es-abstract", | ||
"version": "1.16.2", | ||
"version": "1.16.3", | ||
"author": { | ||
@@ -65,3 +65,3 @@ "name": "Jordan Harband", | ||
"eclint": "^2.8.1", | ||
"eslint": "^6.7.1", | ||
"eslint": "^6.7.2", | ||
"foreach": "^2.0.5", | ||
@@ -68,0 +68,0 @@ "make-arrow-function": "^1.1.0", |
@@ -49,1 +49,10 @@ 'use strict'; | ||
}); | ||
test('accessors', { skip: !Object.getOwnPropertyDescriptor || typeof Map !== 'function' }, function (t) { | ||
var actual = Object.getOwnPropertyDescriptor(Map.prototype, 'size'); | ||
t.ok(actual, 'Map.prototype.size has a descriptor'); | ||
t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); | ||
t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); | ||
t.end(); | ||
}); |
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
448282
8790