@antv/util
Advanced tools
Comparing version 1.0.5 to 1.0.6-beta.2
@@ -73,3 +73,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 33); | ||
/******/ return __webpack_require__(__webpack_require__.s = 31); | ||
/******/ }) | ||
@@ -102,3 +102,3 @@ /************************************************************************/ | ||
if (isArray(elements)) { | ||
for (var i = 0; i < elements.length; i++) { | ||
for (var i = 0, len = elements.length; i < len; i++) { | ||
rst = func(elements[i], i); | ||
@@ -198,10 +198,2 @@ if (rst === false) { | ||
function isNull(value) { | ||
return value === null; | ||
} | ||
function isUndefined(value) { | ||
return value === undefined; | ||
} | ||
// isFinite, | ||
@@ -213,3 +205,3 @@ var isNil = function isNil(value) { | ||
*/ | ||
return isUndefined(value) || isNull(value); | ||
return value === null || value === undefined; | ||
}; | ||
@@ -223,14 +215,2 @@ | ||
var isArrayLike = __webpack_require__(2); | ||
function toArray(value) { | ||
return isArrayLike(value) ? Array.prototype.slice.call(value) : []; | ||
} | ||
module.exports = toArray; | ||
/***/ }), | ||
/* 9 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObjectLike = __webpack_require__(12); | ||
@@ -262,3 +242,3 @@ var isType = __webpack_require__(3); | ||
/***/ }), | ||
/* 10 */ | ||
/* 9 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -280,3 +260,3 @@ | ||
/***/ }), | ||
/* 11 */ | ||
/* 10 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -309,2 +289,14 @@ | ||
/***/ }), | ||
/* 11 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isArrayLike = __webpack_require__(2); | ||
function toArray(value) { | ||
return isArrayLike(value) ? Array.prototype.slice.call(value) : []; | ||
} | ||
module.exports = toArray; | ||
/***/ }), | ||
/* 12 */ | ||
@@ -479,3 +471,3 @@ /***/ (function(module, exports) { | ||
var isArrayLike = __webpack_require__(2); | ||
var pullAt = __webpack_require__(11); | ||
var pullAt = __webpack_require__(10); | ||
@@ -514,3 +506,3 @@ var remove = function remove(arr, predicate) { | ||
var contains = __webpack_require__(10); | ||
var contains = __webpack_require__(9); | ||
@@ -600,3 +592,3 @@ var uniq = function uniq(arr) { | ||
var each = __webpack_require__(1); | ||
var toArray = __webpack_require__(8); | ||
var toArray = __webpack_require__(11); | ||
@@ -622,3 +614,3 @@ var union = function union() { | ||
var isArray = __webpack_require__(0); | ||
var isPlainObject = __webpack_require__(9); | ||
var isPlainObject = __webpack_require__(8); | ||
var each = __webpack_require__(1); | ||
@@ -725,32 +717,2 @@ | ||
var isString = __webpack_require__(6); | ||
var lowerCase = function lowerCase(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toLowerCase(); | ||
}; | ||
module.exports = lowerCase; | ||
/***/ }), | ||
/* 30 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isString = __webpack_require__(6); | ||
var upperCase = function upperCase(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toUpperCase(); | ||
}; | ||
module.exports = upperCase; | ||
/***/ }), | ||
/* 31 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var each = __webpack_require__(1); | ||
@@ -779,3 +741,3 @@ var isArray = __webpack_require__(0); | ||
/***/ }), | ||
/* 32 */ | ||
/* 30 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -785,3 +747,3 @@ | ||
var isArray = __webpack_require__(0); | ||
var groupBy = __webpack_require__(31); | ||
var groupBy = __webpack_require__(29); | ||
@@ -811,61 +773,61 @@ var groupToMap = function groupToMap(data, condition) { | ||
/***/ }), | ||
/* 33 */ | ||
/* 31 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = { | ||
arrayUtil: __webpack_require__(34), | ||
stringUtil: __webpack_require__(35), | ||
clone: __webpack_require__(36), | ||
arrayUtil: __webpack_require__(32), | ||
stringUtil: __webpack_require__(33), | ||
clone: __webpack_require__(34), | ||
each: __webpack_require__(1), | ||
filter: __webpack_require__(16), | ||
indexOf: __webpack_require__(37), | ||
isEmpty: __webpack_require__(38), | ||
indexOf: __webpack_require__(35), | ||
isEmpty: __webpack_require__(36), | ||
isEqual: __webpack_require__(27), | ||
isEqualWith: __webpack_require__(39), | ||
map: __webpack_require__(40), | ||
toArray: __webpack_require__(8), | ||
uniqueId: __webpack_require__(41), | ||
extend: __webpack_require__(42), | ||
augment: __webpack_require__(43), | ||
deepMix: __webpack_require__(44), | ||
isEqualWith: __webpack_require__(37), | ||
map: __webpack_require__(38), | ||
toArray: __webpack_require__(11), | ||
uniqueId: __webpack_require__(39), | ||
extend: __webpack_require__(40), | ||
augment: __webpack_require__(41), | ||
deepMix: __webpack_require__(42), | ||
mix: __webpack_require__(13), | ||
clamp: __webpack_require__(45), | ||
fixedBase: __webpack_require__(46), | ||
isDecimal: __webpack_require__(47), | ||
isEven: __webpack_require__(48), | ||
isInteger: __webpack_require__(49), | ||
isNegative: __webpack_require__(50), | ||
isNumberEqual: __webpack_require__(51), | ||
isOdd: __webpack_require__(52), | ||
isPositive: __webpack_require__(53), | ||
mod: __webpack_require__(54), | ||
toDegree: __webpack_require__(55), | ||
clamp: __webpack_require__(43), | ||
fixedBase: __webpack_require__(44), | ||
isDecimal: __webpack_require__(45), | ||
isEven: __webpack_require__(46), | ||
isInteger: __webpack_require__(47), | ||
isNegative: __webpack_require__(48), | ||
isNumberEqual: __webpack_require__(49), | ||
isOdd: __webpack_require__(50), | ||
isPositive: __webpack_require__(51), | ||
mod: __webpack_require__(52), | ||
toDegree: __webpack_require__(53), | ||
toInt: __webpack_require__(28), | ||
toInteger: __webpack_require__(28), | ||
toRadian: __webpack_require__(56), | ||
maxBy: __webpack_require__(57), | ||
minBy: __webpack_require__(58), | ||
toRadian: __webpack_require__(54), | ||
maxBy: __webpack_require__(55), | ||
minBy: __webpack_require__(56), | ||
getType: __webpack_require__(25), | ||
isArray: __webpack_require__(0), | ||
isArrayLike: __webpack_require__(2), | ||
isBoolean: __webpack_require__(59), | ||
isDate: __webpack_require__(60), | ||
isBoolean: __webpack_require__(57), | ||
isDate: __webpack_require__(58), | ||
isFunction: __webpack_require__(4), | ||
isNil: __webpack_require__(7), | ||
isNull: __webpack_require__(61), | ||
isNull: __webpack_require__(59), | ||
isNumber: __webpack_require__(5), | ||
isObject: __webpack_require__(17), | ||
isObjectLike: __webpack_require__(12), | ||
isPlainObject: __webpack_require__(9), | ||
isPlainObject: __webpack_require__(8), | ||
isPrototype: __webpack_require__(26), | ||
isType: __webpack_require__(3), | ||
isUndefined: __webpack_require__(62), | ||
isUndefined: __webpack_require__(60), | ||
isString: __webpack_require__(6), | ||
isRegExp: __webpack_require__(63), | ||
lowerCase: __webpack_require__(29), | ||
lowerFirst: __webpack_require__(64), | ||
substitute: __webpack_require__(65), | ||
upperCase: __webpack_require__(30), | ||
isRegExp: __webpack_require__(61), | ||
lowerCase: __webpack_require__(62), | ||
lowerFirst: __webpack_require__(63), | ||
substitute: __webpack_require__(64), | ||
upperCase: __webpack_require__(65), | ||
upperFirst: __webpack_require__(66), | ||
contains: __webpack_require__(10), | ||
contains: __webpack_require__(9), | ||
firstValue: __webpack_require__(14), | ||
@@ -875,3 +837,3 @@ flatten: __webpack_require__(22), | ||
pull: __webpack_require__(18), | ||
pullAt: __webpack_require__(11), | ||
pullAt: __webpack_require__(10), | ||
reduce: __webpack_require__(24), | ||
@@ -882,4 +844,4 @@ remove: __webpack_require__(19), | ||
values: __webpack_require__(21), | ||
groupBy: __webpack_require__(31), | ||
groupToMap: __webpack_require__(32), | ||
groupBy: __webpack_require__(29), | ||
groupToMap: __webpack_require__(30), | ||
group: __webpack_require__(67), | ||
@@ -890,11 +852,11 @@ pick: __webpack_require__(68) | ||
/***/ }), | ||
/* 34 */ | ||
/* 32 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = { | ||
contains: __webpack_require__(10), | ||
contains: __webpack_require__(9), | ||
firstValue: __webpack_require__(14), | ||
getRange: __webpack_require__(15), | ||
pull: __webpack_require__(18), | ||
pullAt: __webpack_require__(11), | ||
pullAt: __webpack_require__(10), | ||
remove: __webpack_require__(19), | ||
@@ -909,3 +871,3 @@ uniq: __webpack_require__(20), | ||
/***/ }), | ||
/* 35 */ | ||
/* 33 */ | ||
/***/ (function(module, exports) { | ||
@@ -945,3 +907,3 @@ | ||
/***/ }), | ||
/* 36 */ | ||
/* 34 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -984,3 +946,3 @@ | ||
/***/ }), | ||
/* 37 */ | ||
/* 35 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1012,3 +974,3 @@ | ||
/***/ }), | ||
/* 38 */ | ||
/* 36 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1056,3 +1018,3 @@ | ||
/***/ }), | ||
/* 39 */ | ||
/* 37 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1095,3 +1057,3 @@ | ||
/***/ }), | ||
/* 40 */ | ||
/* 38 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1116,3 +1078,3 @@ | ||
/***/ }), | ||
/* 41 */ | ||
/* 39 */ | ||
/***/ (function(module, exports) { | ||
@@ -1136,3 +1098,3 @@ | ||
/***/ }), | ||
/* 42 */ | ||
/* 40 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1176,7 +1138,7 @@ | ||
/***/ }), | ||
/* 43 */ | ||
/* 41 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isFunction = __webpack_require__(4); | ||
var toArray = __webpack_require__(8); | ||
var toArray = __webpack_require__(11); | ||
var mix = __webpack_require__(13); | ||
@@ -1198,8 +1160,7 @@ | ||
/***/ }), | ||
/* 44 */ | ||
/* 42 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isPlainObject = __webpack_require__(9); | ||
var isPlainObject = __webpack_require__(8); | ||
var isArray = __webpack_require__(0); | ||
var toArray = __webpack_require__(8); | ||
@@ -1234,8 +1195,12 @@ var MAX_MIX_LEVEL = 5; | ||
var deepMix = function deepMix() { | ||
var args = toArray(arguments); | ||
var dist = args[0]; | ||
for (var i = 1; i < args.length; i++) { | ||
_deepMix(dist, args[i]); | ||
var args = new Array(arguments.length); | ||
var length = args.length; | ||
for (var i = 0; i < length; i++) { | ||
args[i] = arguments[i]; | ||
} | ||
return dist; | ||
var rst = args[0]; | ||
for (var _i = 1; _i < length; _i++) { | ||
_deepMix(rst, args[_i]); | ||
} | ||
return rst; | ||
}; | ||
@@ -1246,3 +1211,3 @@ | ||
/***/ }), | ||
/* 45 */ | ||
/* 43 */ | ||
/***/ (function(module, exports) { | ||
@@ -1262,3 +1227,3 @@ | ||
/***/ }), | ||
/* 46 */ | ||
/* 44 */ | ||
/***/ (function(module, exports) { | ||
@@ -1282,3 +1247,3 @@ | ||
/***/ }), | ||
/* 47 */ | ||
/* 45 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1295,3 +1260,3 @@ | ||
/***/ }), | ||
/* 48 */ | ||
/* 46 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1308,3 +1273,3 @@ | ||
/***/ }), | ||
/* 49 */ | ||
/* 47 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1321,3 +1286,3 @@ | ||
/***/ }), | ||
/* 50 */ | ||
/* 48 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1334,3 +1299,3 @@ | ||
/***/ }), | ||
/* 51 */ | ||
/* 49 */ | ||
/***/ (function(module, exports) { | ||
@@ -1347,3 +1312,3 @@ | ||
/***/ }), | ||
/* 52 */ | ||
/* 50 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1360,3 +1325,3 @@ | ||
/***/ }), | ||
/* 53 */ | ||
/* 51 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1373,3 +1338,3 @@ | ||
/***/ }), | ||
/* 54 */ | ||
/* 52 */ | ||
/***/ (function(module, exports) { | ||
@@ -1384,3 +1349,3 @@ | ||
/***/ }), | ||
/* 55 */ | ||
/* 53 */ | ||
/***/ (function(module, exports) { | ||
@@ -1397,3 +1362,3 @@ | ||
/***/ }), | ||
/* 56 */ | ||
/* 54 */ | ||
/***/ (function(module, exports) { | ||
@@ -1410,3 +1375,3 @@ | ||
/***/ }), | ||
/* 57 */ | ||
/* 55 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1460,3 +1425,3 @@ | ||
/***/ }), | ||
/* 58 */ | ||
/* 56 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1510,3 +1475,3 @@ | ||
/***/ }), | ||
/* 59 */ | ||
/* 57 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1529,3 +1494,3 @@ | ||
/***/ }), | ||
/* 60 */ | ||
/* 58 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1542,3 +1507,3 @@ | ||
/***/ }), | ||
/* 61 */ | ||
/* 59 */ | ||
/***/ (function(module, exports) { | ||
@@ -1553,3 +1518,3 @@ | ||
/***/ }), | ||
/* 62 */ | ||
/* 60 */ | ||
/***/ (function(module, exports) { | ||
@@ -1564,3 +1529,3 @@ | ||
/***/ }), | ||
/* 63 */ | ||
/* 61 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1577,8 +1542,22 @@ | ||
/***/ }), | ||
/* 64 */ | ||
/* 62 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isString = __webpack_require__(6); | ||
var lowerCase = __webpack_require__(29); | ||
var lowerCase = function lowerCase(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toLowerCase(); | ||
}; | ||
module.exports = lowerCase; | ||
/***/ }), | ||
/* 63 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isString = __webpack_require__(6); | ||
var lowerFirst = function lowerFirst(value) { | ||
@@ -1588,3 +1567,3 @@ if (!isString(value)) { | ||
} | ||
return lowerCase(value.charAt(0)) + value.substring(1); | ||
return value.charAt(0).toLowerCase() + value.substring(1); | ||
}; | ||
@@ -1595,3 +1574,3 @@ | ||
/***/ }), | ||
/* 65 */ | ||
/* 64 */ | ||
/***/ (function(module, exports) { | ||
@@ -1614,2 +1593,17 @@ | ||
/***/ }), | ||
/* 65 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isString = __webpack_require__(6); | ||
var upperCase = function upperCase(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toUpperCase(); | ||
}; | ||
module.exports = upperCase; | ||
/***/ }), | ||
/* 66 */ | ||
@@ -1619,3 +1613,2 @@ /***/ (function(module, exports, __webpack_require__) { | ||
var isString = __webpack_require__(6); | ||
var upperCase = __webpack_require__(30); | ||
@@ -1626,3 +1619,3 @@ var upperFirst = function upperFirst(value) { | ||
} | ||
return upperCase(value.charAt(0)) + value.substring(1); | ||
return value.charAt(0).toUpperCase() + value.substring(1); | ||
}; | ||
@@ -1636,3 +1629,3 @@ | ||
var groupToMap = __webpack_require__(32); | ||
var groupToMap = __webpack_require__(30); | ||
@@ -1658,3 +1651,3 @@ var group = function group(data, condition) { | ||
var each = __webpack_require__(1); | ||
var isPlaineObject = __webpack_require__(9); | ||
var isPlaineObject = __webpack_require__(8); | ||
@@ -1661,0 +1654,0 @@ var hasOwnProperty = Object.prototype.hasOwnProperty; |
var isPlainObject = require('./type/isPlainObject'); | ||
var isArray = require('./type/isArray'); | ||
var toArray = require('./toArray'); | ||
@@ -33,10 +32,14 @@ var MAX_MIX_LEVEL = 5; | ||
var deepMix = function deepMix() { | ||
var args = toArray(arguments); | ||
var dist = args[0]; | ||
for (var i = 1; i < args.length; i++) { | ||
_deepMix(dist, args[i]); | ||
var args = new Array(arguments.length); | ||
var length = args.length; | ||
for (var i = 0; i < length; i++) { | ||
args[i] = arguments[i]; | ||
} | ||
return dist; | ||
var rst = args[0]; | ||
for (var _i = 1; _i < length; _i++) { | ||
_deepMix(rst, args[_i]); | ||
} | ||
return rst; | ||
}; | ||
module.exports = deepMix; |
@@ -10,3 +10,3 @@ var isObject = require('./type/isObject'); | ||
if (isArray(elements)) { | ||
for (var i = 0; i < elements.length; i++) { | ||
for (var i = 0, len = elements.length; i < len; i++) { | ||
rst = func(elements[i], i); | ||
@@ -13,0 +13,0 @@ if (rst === false) { |
var isString = require('../type/isString'); | ||
var lowerCase = require('./lowerCase'); | ||
@@ -8,5 +7,5 @@ var lowerFirst = function lowerFirst(value) { | ||
} | ||
return lowerCase(value.charAt(0)) + value.substring(1); | ||
return value.charAt(0).toLowerCase() + value.substring(1); | ||
}; | ||
module.exports = lowerFirst; |
var isString = require('../type/isString'); | ||
var upperCase = require('./upperCase'); | ||
@@ -8,5 +7,5 @@ var upperFirst = function upperFirst(value) { | ||
} | ||
return upperCase(value.charAt(0)) + value.substring(1); | ||
return value.charAt(0).toUpperCase() + value.substring(1); | ||
}; | ||
module.exports = upperFirst; |
@@ -1,9 +0,1 @@ | ||
function isNull(value) { | ||
return value === null; | ||
} | ||
function isUndefined(value) { | ||
return value === undefined; | ||
} | ||
// isFinite, | ||
@@ -15,5 +7,5 @@ var isNil = function isNil(value) { | ||
*/ | ||
return isUndefined(value) || isNull(value); | ||
return value === null || value === undefined; | ||
}; | ||
module.exports = isNil; |
{ | ||
"name": "@antv/util", | ||
"version": "1.0.5", | ||
"version": "1.0.6-beta.2", | ||
"description": "A common util collection for antv projects", | ||
@@ -5,0 +5,0 @@ "browser": "build/util.js", |
const isPlainObject = require('./type/isPlainObject'); | ||
const isArray = require('./type/isArray'); | ||
const toArray = require('./toArray'); | ||
@@ -33,10 +32,14 @@ const MAX_MIX_LEVEL = 5; | ||
const deepMix = function() { | ||
const args = toArray(arguments); | ||
const dist = args[0]; | ||
for (let i = 1; i < args.length; i++) { | ||
_deepMix(dist, args[i]); | ||
const args = new Array(arguments.length); | ||
const length = args.length; | ||
for (let i = 0; i < length; i++) { | ||
args[i] = arguments[i]; | ||
} | ||
return dist; | ||
const rst = args[0]; | ||
for (let i = 1; i < length; i++) { | ||
_deepMix(rst, args[i]); | ||
} | ||
return rst; | ||
}; | ||
module.exports = deepMix; |
@@ -10,3 +10,3 @@ const isObject = require('./type/isObject'); | ||
if (isArray(elements)) { | ||
for (let i = 0; i < elements.length; i++) { | ||
for (let i = 0, len = elements.length; i < len; i++) { | ||
rst = func(elements[i], i); | ||
@@ -13,0 +13,0 @@ if (rst === false) { |
const isString = require('../type/isString'); | ||
const lowerCase = require('./lowerCase'); | ||
@@ -8,5 +7,5 @@ const lowerFirst = function(value) { | ||
} | ||
return lowerCase(value.charAt(0)) + value.substring(1); | ||
return value.charAt(0).toLowerCase() + value.substring(1); | ||
}; | ||
module.exports = lowerFirst; |
const isString = require('../type/isString'); | ||
const upperCase = require('./upperCase'); | ||
@@ -8,5 +7,5 @@ const upperFirst = function(value) { | ||
} | ||
return upperCase(value.charAt(0)) + value.substring(1); | ||
return value.charAt(0).toUpperCase() + value.substring(1); | ||
}; | ||
module.exports = upperFirst; |
@@ -1,9 +0,1 @@ | ||
function isNull(value) { | ||
return value === null; | ||
} | ||
function isUndefined(value) { | ||
return value === undefined; | ||
} | ||
// isFinite, | ||
@@ -15,5 +7,5 @@ const isNil = function(value) { | ||
*/ | ||
return isUndefined(value) || isNull(value); | ||
return value === null || value === undefined; | ||
}; | ||
module.exports = isNil; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
132020
4227
1