flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
18
BACK_BACK/node_modules/es-abstract/2017/OrdinaryHasProperty.js
generated
vendored
Executable file
18
BACK_BACK/node_modules/es-abstract/2017/OrdinaryHasProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
|
||||
|
||||
module.exports = function OrdinaryHasProperty(O, P) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: P must be a Property Key');
|
||||
}
|
||||
return P in O;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue