source: imaps-frontend/node_modules/es-abstract/2017/OrdinaryHasProperty.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 496 bytes
RevLine 
[d565449]1'use strict';
2
3var $TypeError = require('es-errors/type');
4
[79a0317]5var isObject = require('../helpers/isObject');
6var isPropertyKey = require('../helpers/isPropertyKey');
[d565449]7
8// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
9
10module.exports = function OrdinaryHasProperty(O, P) {
[79a0317]11 if (!isObject(O)) {
[d565449]12 throw new $TypeError('Assertion failed: Type(O) is not Object');
13 }
[79a0317]14 if (!isPropertyKey(P)) {
[d565449]15 throw new $TypeError('Assertion failed: P must be a Property Key');
16 }
17 return P in O;
18};
Note: See TracBrowser for help on using the repository browser.