main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
389 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var every = require('./every');
|
---|
4 |
|
---|
5 | module.exports = function isSamePropertyDescriptor(ES, D1, D2) {
|
---|
6 | var fields = [
|
---|
7 | '[[Configurable]]',
|
---|
8 | '[[Enumerable]]',
|
---|
9 | '[[Get]]',
|
---|
10 | '[[Set]]',
|
---|
11 | '[[Value]]',
|
---|
12 | '[[Writable]]'
|
---|
13 | ];
|
---|
14 | return every(fields, function (field) {
|
---|
15 | if ((field in D1) !== (field in D2)) {
|
---|
16 | return false;
|
---|
17 | }
|
---|
18 | return ES.SameValue(D1[field], D2[field]);
|
---|
19 | });
|
---|
20 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.