You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
462 B
JavaScript
19 lines
462 B
JavaScript
10 years ago
|
/*jshint globalstrict:true*/
|
||
|
'use strict';
|
||
|
|
||
|
var isDefined = angular.isDefined,
|
||
|
isUndefined = angular.isUndefined,
|
||
|
isNumber = angular.isNumber,
|
||
|
isObject = angular.isObject,
|
||
|
isArray = angular.isArray,
|
||
|
extend = angular.extend,
|
||
|
toJson = angular.toJson,
|
||
|
fromJson = angular.fromJson;
|
||
|
|
||
|
|
||
|
// Test if string is only contains numbers
|
||
|
// e.g '1' => true, "'1'" => true
|
||
|
function isStringNumber(num) {
|
||
|
return /^-?\d+\.?\d*$/.test(num.replace(/["']/g, ''));
|
||
|
}
|