Changeset 79a0317 for imaps-frontend/node_modules/es-abstract/2016/Get.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2016/Get.js
r0c6b92a r79a0317 5 5 var inspect = require('object-inspect'); 6 6 7 var IsPropertyKey = require('./IsPropertyKey');8 var Type = require('./Type');7 var isObject = require('../helpers/isObject'); 8 var isPropertyKey = require('../helpers/isPropertyKey'); 9 9 10 10 // https://262.ecma-international.org/6.0/#sec-get-o-p … … 12 12 module.exports = function Get(O, P) { 13 13 // 7.3.1.1 14 if ( Type(O) !== 'Object') {14 if (!isObject(O)) { 15 15 throw new $TypeError('Assertion failed: Type(O) is not Object'); 16 16 } 17 17 // 7.3.1.2 18 if (! IsPropertyKey(P)) {19 throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));18 if (!isPropertyKey(P)) { 19 throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P)); 20 20 } 21 21 // 7.3.1.3
Note:
See TracChangeset
for help on using the changeset viewer.