How to use the angular.isNumber function in angular

To help you get started, we’ve selected a few angular 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 ui-router / sample-app-angular-hybrid / lib-ts / vis / directives / uirTransitionView.ts View on Github external
$scope.isObject = (object) => // If it's not a string, not a number, not a boolean, is it an object?
        object && !angular.isString(object) && !angular.isNumber(object) && object !== true && object !== false;
github Talend / data-prep / dataprep-webapp / src / app / services / state / grid / grid-state-service.js View on Github external
function updateSelectedColumnLine(data) {
		// in preview we do not change anything
		if (data.preview) {
			return;
		}

		const hasSelectedLine = angular.isNumber(gridState.lineIndex);
		if (!hasSelectedLine || gridState.selectedColumns.length) {
			updateSelectedColumn(data);
		}

		if (hasSelectedLine) {
			updateSelectedLine();
		}
	}
github DefinitelyTyped / DefinitelyTyped / angular-ui-router / angular-ui-router-tests.ts View on Github external
    is: (val) => angular.isNumber(val) && isFinite(val) && val % 1 === 0,
    pattern: /\d+/
github spring-projects / spring-flo / src / controllers / graph-editor.js View on Github external
function _isCustomEvent(args) {
        return args.length === 5 &&
			angular.isString(args[0]) &&
			(args[0].indexOf('link:') === 0 || args[0].indexOf('element:') === 0) &&
			args[1] instanceof jQuery.Event &&
			args[2] instanceof joint.dia.CellView &&
			angular.isNumber(args[3]) &&
			angular.isNumber(args[4]);
    }
github spring-projects / spring-flo / src / controllers / graph-editor.js View on Github external
function _isCustomEvent(args) {
        return args.length === 5 &&
			angular.isString(args[0]) &&
			(args[0].indexOf('link:') === 0 || args[0].indexOf('element:') === 0) &&
			args[1] instanceof jQuery.Event &&
			args[2] instanceof joint.dia.CellView &&
			angular.isNumber(args[3]) &&
			angular.isNumber(args[4]);
    }
github alien4cloud / alien4cloud / alien4cloud-ui / src / main / webapp / scripts / common / directives / generic_form.js View on Github external
FORMS.applyMultiplierToInput = function(scope) {
    if (_.defined(scope.propertyType._multiplier) && _.defined(scope.input.value) && angular.isNumber(scope.input.value)) {
      scope.input.value = scope.input.value / scope.propertyType._multiplier;
    }
  };
github ovh / manager / packages / manager / modules / telecom-universe-components / src / toaster / toast.service.js View on Github external
function pushMessage(message, type, opts) {
    const options = defaults(opts || {}, defaultOptions);

    const timeout = get(options, 'hideAfter');
    const msg = {
      content: message,
      type,
    };

    messages.push(msg);

    if (angular.isNumber(timeout)) {
      $timeout(() => {
        remove(messages, msg);
      }, timeout);
    }
  }
github ovh / manager / packages / manager / modules / emailpro / src / service / configure / emailpro-service-configure.controller.js View on Github external
(serviceDescription) => {
        $scope.service = serviceDescription;
        $scope.service.lockoutThreshold = angular.isNumber(
          $scope.service.lockoutThreshold,
        )
          ? $scope.service.lockoutThreshold
          : 0;

        $scope.service.minPasswordLength = angular.isNumber(
          $scope.service.minPasswordLength,
        )
          ? $scope.service.minPasswordLength
          : 0;
        $scope.service.minPasswordAge = angular.isNumber(
          $scope.service.minPasswordAge,
        )
          ? $scope.service.minPasswordAge
          : 0;
        $scope.service.maxPasswordAge = angular.isNumber(
          $scope.service.maxPasswordAge,
        )
          ? $scope.service.maxPasswordAge
          : 0;
        $scope.loaders.details = false;
        return $scope.service;
      },
      () => {