Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isContentAnalysisActive() {
var l10nObject = getL10nObject();
return ! isUndefined( l10nObject ) && l10nObject.contentAnalysisActive === "1";
}
if ( keywordAnalysisActive === false ) {
return null;
}
let assessor;
if ( useTaxonomy === true ) {
assessor = new TaxonomyAssessor( this._i18n );
} else {
assessor = useCornerstone === true
? new CornerstoneSEOAssessor( this._i18n, { locale: locale, researcher: this._researcher } )
: new SEOAssessor( this._i18n, { locale: locale, researcher: this._researcher } );
}
if ( useKeywordDistribution && isUndefined( assessor.getAssessment( "keyphraseDistribution" ) ) ) {
assessor.addAssessment( "keyphraseDistribution", keyphraseDistribution );
}
this._registeredAssessments.forEach( ( { name, assessment } ) => {
if ( isUndefined( assessor.getAssessment( name ) ) ) {
assessor.addAssessment( name, assessment );
}
} );
return assessor;
}
return irregular;
}
const hispanic = buildTwoFormsFromRegex( base, createRulesFromMorphologyData( regexNoun.hispanic ) );
if ( ! isUndefined( hispanic ) ) {
forms.push( hispanic[ 0 ], hispanic[ 1 ] );
return forms;
}
const singular = buildOneFormFromRegex( base, createRulesFromMorphologyData( regexNoun.singularize ) );
if ( ! isUndefined( singular ) ) {
forms.push( singular );
}
const plural = buildOneFormFromRegex( base, createRulesFromMorphologyData( regexNoun.pluralize ) );
if ( ! isUndefined( plural ) ) {
forms.push( plural );
}
return unique( forms );
};
App.prototype.runKeywordAnalysis = function() {
if ( this.config.keywordAnalysisActive ) {
this.seoAssessor.assess( this.paper );
const overallSeoScore = this.seoAssessor.calculateOverallScore();
if ( ! isUndefined( this.callbacks.updatedKeywordsResults ) ) {
this.callbacks.updatedKeywordsResults( this.seoAssessor.results, overallSeoScore );
}
if ( ! isUndefined( this.callbacks.saveScores ) ) {
this.callbacks.saveScores( overallSeoScore, this.seoAssessorPresenter );
}
}
};
fetchParticipantsDetails() {
if (!_.isUndefined(this.batchDetails.participants)) {
const request = {
filters: {
identifier: this.batchDetails.participants
}
};
this.courseBatchService.getUserList(request).pipe(
takeUntil(this.unsubscribe))
.subscribe((res) => {
this.batchDetails.participantDetails = res.result.response.content;
this.showEnrollDetails = true;
}, (err) => {
this.toasterService.error(this.resourceService.messages.fmsg.m0056);
this.redirect();
});
} else {
this.showEnrollDetails = true;
this.states.timer = this.$timeout(() => {
if (!isUndefined(this.search)) {
this.search.active = false;
this.search.placeholder = 'Quick search';
}
}, 300);
}
DeviationFragment.prototype.createRegex = function() {
var regexString = "";
var options = this._options;
var fragment = this._fragment;
if ( ! isUndefined( options.notFollowedBy ) ) {
fragment += "(?![" + options.notFollowedBy.join( "" ) + "])";
}
if ( ! isUndefined( options.alsoFollowedBy ) ) {
fragment += "[" + options.alsoFollowedBy.join( "" ) + "]?";
}
switch ( this._location ) {
case "atBeginning":
regexString = "^" + fragment;
break;
case "atEnd":
regexString = fragment + "$";
break;
this.db.fragments.findOne({fragmentId: fragmentId, documentId: documentId}, function(err, fragment) {
if (err) {
return reject(new Err('FragmentStore.ReadError', {
cause: err
}))
}
resolve(!isUndefined(fragment))
})
}.bind(this))
.filter((obj, i, all) => referenceFor(obj) !== referenceForModel(SubscriptionModel)
|| _.isUndefined(all.find(({metadata}) => [_.get(obj.status, 'currentCSV'), _.get(obj.spec, 'startingCSV')].includes(metadata.name))))
}
componentFactoryResolver,
onClose,
beforeHidden,
}: IModalOptions) {
const finalComponentFactoryResolver = componentFactoryResolver || this.componentFactoryResolver;
const modalRef = this.overlayContainerRef.createComponent(
finalComponentFactoryResolver.resolveComponentFactory(ModalComponent),
injector
);
assign(modalRef.instance, {
id,
width,
showAnimate,
beforeHidden,
backdropCloseable: isUndefined(backdropCloseable) ? true : backdropCloseable,
});
const modalContentInstance = modalRef.instance.modalContainerHost.viewContainerRef
.createComponent(finalComponentFactoryResolver.resolveComponentFactory(component), 0, injector);
assign(modalContentInstance.instance, { data, handler });
modalRef.instance.onHidden = () => {
if (onClose) {
onClose();
}
modalRef.hostView.destroy();
};
modalRef.instance.show();
return {