angular-es-utils
Advanced tools
Comparing version 1.2.25 to 1.2.26
{ | ||
"name": "angular-es-utils", | ||
"version": "1.2.25", | ||
"version": "1.2.26", | ||
"description": "es utils design for angular1.x", | ||
@@ -11,3 +11,3 @@ "main": "./index.js", | ||
"test": "karma start --single-run", | ||
"pub": "npm run build && npm publish lib", | ||
"pub": "npm run build && npm publish lib && cnpm sync angular-es-utils", | ||
"start": "NODE_ENV=dev karma start" | ||
@@ -14,0 +14,0 @@ }, |
@@ -6,17 +6,16 @@ 'use strict'; | ||
}); | ||
exports.isNumber = undefined; | ||
exports.isClass = isClass; | ||
var _angular = require('angular'); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _angular2 = _interopRequireDefault(_angular); | ||
exports.isClass = isClass; | ||
exports.isNumber = isNumber; | ||
exports.isRegExp = isRegExp; | ||
exports.isObject = isObject; | ||
exports.isString = isString; | ||
/** | ||
* @author Kuitos | ||
* @homepage https://github.com/kuitos/ | ||
* @since 2016-06-07 | ||
*/ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var isNumber = exports.isNumber = _angular2.default.isNumber; /** | ||
* @author Kuitos | ||
* @homepage https://github.com/kuitos/ | ||
* @since 2016-06-07 | ||
*/ | ||
var msie = window.document.documentMode; | ||
@@ -31,2 +30,18 @@ function isClass(func) { | ||
return typeof func === 'function' && /^(?:class\s|constructor\()/.test(Function.prototype.toString.call(func)); | ||
} | ||
function isNumber() { | ||
return typeof value === 'number'; | ||
} | ||
function isRegExp(value) { | ||
return Object.prototype.toString.call(value) === '[object RegExp]'; | ||
} | ||
function isObject(value) { | ||
return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object'; | ||
} | ||
function isString(value) { | ||
return typeof value === 'string'; | ||
} |
23508
561