|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
501 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var $TypeError = require('es-errors/type');
|
|---|
| 4 | var isObject = require('es-object-atoms/isObject');
|
|---|
| 5 |
|
|---|
| 6 | var isPropertyKey = require('../helpers/isPropertyKey');
|
|---|
| 7 |
|
|---|
| 8 | // https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
|
|---|
| 9 |
|
|---|
| 10 | module.exports = function OrdinaryHasProperty(O, P) {
|
|---|
| 11 | if (!isObject(O)) {
|
|---|
| 12 | throw new $TypeError('Assertion failed: Type(O) is not Object');
|
|---|
| 13 | }
|
|---|
| 14 | if (!isPropertyKey(P)) {
|
|---|
| 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.