Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
utf8mb4
Commit Description:
utf8mb4
'use strict' ;
var GetIntrinsic = require ( '../GetIntrinsic' );
var has = require ( 'has' );
var $TypeError = GetIntrinsic ( '%TypeError%' );
module . exports = function IsPropertyDescriptor ( ES , Desc ) {
if ( ES . Type ( Desc ) !== 'Object' ) {
return false ;
}
var allowed = {
'[[Configurable]]' : true ,
'[[Enumerable]]' : true ,
'[[Get]]' : true ,
'[[Set]]' : true ,
'[[Value]]' : true ,
'[[Writable]]' : true
};
for ( var key in Desc ) { // eslint-disable-line
if ( has ( Desc , key ) && ! allowed [ key ]) {
return false ;
}
}
if ( ES . IsDataDescriptor ( Desc ) && ES . IsAccessorDescriptor ( Desc )) {
throw new $TypeError ( 'Property Descriptors may not be both accessor and data descriptors' );
}
return true ;
};
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings