mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 02:21:05 +08:00
None of the breaking changes listed in https://github.com/mochajs/mocha/releases/tag/v7.0.0 appear to be relevant for us. R=jacktfranklin@chromium.org DISABLE_THIRD_PARTY_CHECK=Update Mocha Bug: 1068145 Change-Id: I4aec1e775595a0cfcfaa307a8aad7fc9abad22ca Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2137392 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
24 lines
454 B
JavaScript
24 lines
454 B
JavaScript
'use strict';
|
|
|
|
var has = require('has');
|
|
|
|
var Type = require('./Type');
|
|
|
|
var assertRecord = require('../helpers/assertRecord');
|
|
|
|
// https://ecma-international.org/ecma-262/5.1/#sec-8.10.2
|
|
|
|
module.exports = function IsDataDescriptor(Desc) {
|
|
if (typeof Desc === 'undefined') {
|
|
return false;
|
|
}
|
|
|
|
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
|
|
|
if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
};
|