Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$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;
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();
}
}
is: (val) => angular.isNumber(val) && isFinite(val) && val % 1 === 0,
pattern: /\d+/
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]);
}
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]);
}
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;
}
};
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);
}
}
(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;
},
() => {