Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const add_column = (columns, col_name) => {
// ignore repeats
const names = columns.map(col => col.name);
if (includes(names, col_name)) {
return columns;
} else {
const col_def = {
id: col_name,
name: col_name,
field: col_name,
sortable: true,
};
columns.push(col_def);
return columns;
}
};
export default add_column;
var add_column = function add_column(columns, col_name) {
// ignore repeats
var names = columns.map(function (col) {
return col.name;
});
if (includes(names, col_name)) {
return columns;
} else {
var col_def = {
id: col_name,
name: col_name,
field: col_name,
sortable: true
};
columns.push(col_def);
return columns;
}
};
const numberOfSubheadingsReflectingTopic = function( topicForms, subheadings, useSynonyms, locale ) {
const isFunctionWordLanguage = includes( functionWordLanguages, getLanguage( locale ) );
return subheadings.filter( subheading => {
const matchedTopicForms = findTopicFormsInString( topicForms, subheading, useSynonyms, locale );
if ( ! isFunctionWordLanguage ) {
return matchedTopicForms.percentWordMatches === 100;
}
return matchedTopicForms.percentWordMatches > 50;
} ).length;
};
_.each(this.contentList, (value) => {
value['hoverData'] = {
'note': this.isBrowse && _.get(value, 'downloadStatus') ===
'DOWNLOADED' ? this.resourceService.frmelmnts.lbl.goToMyDownloads : '',
'actions': [
{
'type': this.isBrowse ? 'download' : 'save',
'label': this.isBrowse ? _.capitalize(_.get(value, 'downloadStatus')) ||
this.resourceService.frmelmnts.btn.download :
this.resourceService.frmelmnts.lbl.saveToPenDrive,
'disabled': this.isBrowse && _.includes(['DOWNLOADED', 'DOWNLOADING', 'PAUSED'], _.get(value, 'downloadStatus')) ? true : false
},
{
'type': 'open',
'label': this.resourceService.frmelmnts.lbl.open
}
]
};
});
}
EnglishParticiple.prototype.isNonVerbEndingEd = function() {
if ( this.getType() === "irregular" ) {
return false;
}
return includes( nonVerbsEndingEd, this.getParticiple() );
};
file => !this.state.filter || includes(toLower(file.name), loweredFilter)
);
const isPodError = (pod: PodKind) => _.includes(errorPhases, podPhase(pod));
var characterInBoundary = function( character ) {
return includes( wordBoundaries, character );
};