How to use the lodash-es.isUndefined function in lodash-es

To help you get started, we’ve selected a few lodash-es examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yoast / wordpress-seo / js / src / analysis / isContentAnalysisActive.js View on Github external
function isContentAnalysisActive() {
	var l10nObject = getL10nObject();

	return ! isUndefined( l10nObject ) && l10nObject.contentAnalysisActive === "1";
}
github Yoast / YoastSEO.js / src / worker / AnalysisWebWorker.js View on Github external
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;
	}
github Yoast / YoastSEO.js / src / morphology / english / getNounForms.js View on Github external
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 );
};
github Yoast / YoastSEO.js / src / app.js View on Github external
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 );
		}
	}
};
github Sunbird-Ed / SunbirdEd-portal / src / app / client / src / app / modules / learn / components / batch / unenroll-batch / unenroll-batch.component.ts View on Github external
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;
github ahoereth / spam / src / components / navbar / NavbarController.js View on Github external
this.states.timer = this.$timeout(() => {
        if (!isUndefined(this.search)) {
          this.search.active = false;
          this.search.placeholder = 'Quick search';
        }
      }, 300);
    }
github Yoast / YoastSEO.js / src / stringProcessing / syllables / DeviationFragment.js View on Github external
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;
github archivist / archivist / packages / store / fragment / FragmentStore.js View on Github external
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))
github openshift / console / frontend / public / components / operator-lifecycle-manager / clusterserviceversion.tsx View on Github external
.filter((obj, i, all) => referenceFor(obj) !== referenceForModel(SubscriptionModel)
            || _.isUndefined(all.find(({metadata}) => [_.get(obj.status, 'currentCSV'), _.get(obj.spec, 'startingCSV')].includes(metadata.name))))
      }
github DevCloudFE / ng-devui / devui / modal / modal.service.ts View on Github external
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 {