if ( ts.collationTable ) {
// Build array of key names
for ( key in ts.collationTable ) {
- // Check hasOwn to be safe
- if ( Object.prototype.hasOwnProperty.call( ts.collationTable, key ) ) {
- keys.push( mw.RegExp.escape( key ) );
- }
+ keys.push( mw.RegExp.escape( key ) );
}
if ( keys.length ) {
ts.collationRegex = new RegExp( keys.join( '|' ), 'ig' );
function getFirstKey( obj ) {
var key;
for ( key in obj ) {
- if ( Object.prototype.hasOwnProperty.call( obj, key ) ) {
- return key;
- }
+ return key;
}
}
};
for ( id in panes ) {
- if ( !Object.prototype.hasOwnProperty.call( panes, id ) ) {
- continue;
- }
-
$( '<div>' )
.prop( {
className: 'mw-debug-pane',
.appendTo( $table );
for ( key in data ) {
- if ( !Object.prototype.hasOwnProperty.call( data, key ) ) {
- continue;
- }
-
$( '<tr>' )
.append( $( '<th>' ).text( key ) )
.append( $( '<td>' ).text( data[ key ] ) )
for ( i = 0; i < arguments.length; i++ ) {
table = arguments[ i ];
for ( key in table ) {
- if ( Object.prototype.hasOwnProperty.call( table, key ) ) {
- // The thousand separator should be deleted
- flipped[ table[ key ] ] = key === ',' ? '' : key;
- }
+ // The thousand separator should be deleted
+ flipped[ table[ key ] ] = key === ',' ? '' : key;
}
}
actionPaths = mw.config.get( 'wgActionPaths' );
for ( key in actionPaths ) {
- if ( Object.prototype.hasOwnProperty.call( actionPaths, key ) ) {
- parts = actionPaths[ key ].split( '$1' );
- parts = parts.map( mw.RegExp.escape );
- m = new RegExp( parts.join( '(.+)' ) ).exec( url );
- if ( m && m[ 1 ] ) {
- return key;
- }
-
+ parts = actionPaths[ key ].split( '$1' );
+ parts = parts.map( mw.RegExp.escape );
+ m = new RegExp( parts.join( '(.+)' ) ).exec( url );
+ if ( m && m[ 1 ] ) {
+ return key;
}
}