@antv/util
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -73,3 +73,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(__webpack_require__.s = 22); | ||
/******/ return __webpack_require__(__webpack_require__.s = 25); | ||
/******/ }) | ||
@@ -93,3 +93,3 @@ /************************************************************************/ | ||
var isObject = __webpack_require__(12); | ||
var isObject = __webpack_require__(13); | ||
var isArray = __webpack_require__(0); | ||
@@ -186,2 +186,13 @@ | ||
function toString(value) { | ||
return value.toString(); | ||
} | ||
module.exports = toString; | ||
/***/ }), | ||
/* 7 */ | ||
/***/ (function(module, exports) { | ||
// isFinite, | ||
@@ -199,6 +210,6 @@ var isNil = function isNil(value) { | ||
/***/ }), | ||
/* 7 */ | ||
/* 8 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObjectLike = __webpack_require__(8); | ||
var isObjectLike = __webpack_require__(9); | ||
var isType = __webpack_require__(3); | ||
@@ -229,3 +240,3 @@ | ||
/***/ }), | ||
/* 8 */ | ||
/* 9 */ | ||
/***/ (function(module, exports) { | ||
@@ -248,3 +259,3 @@ | ||
/***/ }), | ||
/* 9 */ | ||
/* 10 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -261,3 +272,3 @@ | ||
/***/ }), | ||
/* 10 */ | ||
/* 11 */ | ||
/***/ (function(module, exports) { | ||
@@ -283,3 +294,3 @@ | ||
/***/ }), | ||
/* 11 */ | ||
/* 12 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -301,3 +312,3 @@ | ||
/***/ }), | ||
/* 12 */ | ||
/* 13 */ | ||
/***/ (function(module, exports) { | ||
@@ -321,3 +332,3 @@ | ||
/***/ }), | ||
/* 13 */ | ||
/* 14 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -344,3 +355,3 @@ | ||
/***/ }), | ||
/* 14 */ | ||
/* 15 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -373,3 +384,3 @@ | ||
/***/ }), | ||
/* 15 */ | ||
/* 16 */ | ||
/***/ (function(module, exports) { | ||
@@ -380,3 +391,27 @@ | ||
/***/ }), | ||
/* 16 */ | ||
/* 17 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var toString = __webpack_require__(6); | ||
var lowerCase = function lowerCase(str) { | ||
return toString(str).toLowerCase(); | ||
}; | ||
module.exports = lowerCase; | ||
/***/ }), | ||
/* 18 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var toString = __webpack_require__(6); | ||
var upperCase = function upperCase(str) { | ||
return toString(str).toUpperCase(); | ||
}; | ||
module.exports = upperCase; | ||
/***/ }), | ||
/* 19 */ | ||
/***/ (function(module, exports) { | ||
@@ -393,3 +428,3 @@ | ||
/***/ }), | ||
/* 17 */ | ||
/* 20 */ | ||
/***/ (function(module, exports) { | ||
@@ -407,3 +442,3 @@ | ||
/***/ }), | ||
/* 18 */ | ||
/* 21 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -420,3 +455,3 @@ | ||
/***/ }), | ||
/* 19 */ | ||
/* 22 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -426,3 +461,3 @@ | ||
var isArray = __webpack_require__(0); | ||
var groupBy = __webpack_require__(20); | ||
var groupBy = __webpack_require__(23); | ||
@@ -452,3 +487,3 @@ var groupToMap = function groupToMap(data, condition) { | ||
/***/ }), | ||
/* 20 */ | ||
/* 23 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -479,8 +514,8 @@ | ||
/***/ }), | ||
/* 21 */ | ||
/* 24 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isObjectLike = __webpack_require__(8); | ||
var isObjectLike = __webpack_require__(9); | ||
var isArrayLike = __webpack_require__(2); | ||
var isString = __webpack_require__(18); | ||
var isString = __webpack_require__(21); | ||
@@ -531,13 +566,13 @@ var isEqual = function isEqual(value, other) { | ||
/***/ }), | ||
/* 22 */ | ||
/* 25 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var arrayUtil = __webpack_require__(23); | ||
var eventUtil = __webpack_require__(34); | ||
var mathUtil = __webpack_require__(37); | ||
var stringUtil = __webpack_require__(52); | ||
var typeUtil = __webpack_require__(53); | ||
var arrayUtil = __webpack_require__(26); | ||
var eventUtil = __webpack_require__(37); | ||
var mathUtil = __webpack_require__(40); | ||
var stringUtil = __webpack_require__(55); | ||
var typeUtil = __webpack_require__(61); | ||
var each = __webpack_require__(1); | ||
var mix = __webpack_require__(10); | ||
var mix = __webpack_require__(11); | ||
@@ -552,20 +587,21 @@ var util = { | ||
// others | ||
augment: __webpack_require__(58), | ||
clone: __webpack_require__(59), | ||
deepMix: __webpack_require__(60), | ||
augment: __webpack_require__(66), | ||
clone: __webpack_require__(67), | ||
deepMix: __webpack_require__(68), | ||
each: each, | ||
extend: __webpack_require__(61), | ||
filter: __webpack_require__(13), | ||
group: __webpack_require__(62), | ||
groupBy: __webpack_require__(20), | ||
groupToMap: __webpack_require__(19), | ||
indexOf: __webpack_require__(63), | ||
isEmpty: __webpack_require__(64), | ||
isEqual: __webpack_require__(21), | ||
isEqualWith: __webpack_require__(65), | ||
map: __webpack_require__(66), | ||
extend: __webpack_require__(69), | ||
filter: __webpack_require__(14), | ||
group: __webpack_require__(70), | ||
groupBy: __webpack_require__(23), | ||
groupToMap: __webpack_require__(22), | ||
indexOf: __webpack_require__(71), | ||
isEmpty: __webpack_require__(72), | ||
isEqual: __webpack_require__(24), | ||
isEqualWith: __webpack_require__(73), | ||
map: __webpack_require__(74), | ||
mix: mix, | ||
pick: __webpack_require__(67), | ||
toArray: __webpack_require__(9), | ||
uniqueId: __webpack_require__(68) | ||
pick: __webpack_require__(75), | ||
toArray: __webpack_require__(10), | ||
toString: __webpack_require__(6), | ||
uniqueId: __webpack_require__(76) | ||
}; | ||
@@ -580,25 +616,25 @@ | ||
/***/ }), | ||
/* 23 */ | ||
/* 26 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = { | ||
contains: __webpack_require__(11), | ||
firstValue: __webpack_require__(24), | ||
flatten: __webpack_require__(25), | ||
getRange: __webpack_require__(26), | ||
merge: __webpack_require__(27), | ||
pull: __webpack_require__(28), | ||
pullAt: __webpack_require__(14), | ||
reduce: __webpack_require__(29), | ||
remove: __webpack_require__(30), | ||
union: __webpack_require__(31), | ||
uniq: __webpack_require__(32), | ||
values: __webpack_require__(33) | ||
contains: __webpack_require__(12), | ||
firstValue: __webpack_require__(27), | ||
flatten: __webpack_require__(28), | ||
getRange: __webpack_require__(29), | ||
merge: __webpack_require__(30), | ||
pull: __webpack_require__(31), | ||
pullAt: __webpack_require__(15), | ||
reduce: __webpack_require__(32), | ||
remove: __webpack_require__(33), | ||
union: __webpack_require__(34), | ||
uniq: __webpack_require__(35), | ||
values: __webpack_require__(36) | ||
}; | ||
/***/ }), | ||
/* 24 */ | ||
/* 27 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isNil = __webpack_require__(6); | ||
var isNil = __webpack_require__(7); | ||
var isArray = __webpack_require__(0); | ||
@@ -626,3 +662,3 @@ | ||
/***/ }), | ||
/* 25 */ | ||
/* 28 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -662,6 +698,6 @@ | ||
/***/ }), | ||
/* 26 */ | ||
/* 29 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var filter = __webpack_require__(13); | ||
var filter = __webpack_require__(14); | ||
var isArray = __webpack_require__(0); | ||
@@ -699,3 +735,3 @@ | ||
/***/ }), | ||
/* 27 */ | ||
/* 30 */ | ||
/***/ (function(module, exports) { | ||
@@ -714,3 +750,3 @@ | ||
/***/ }), | ||
/* 28 */ | ||
/* 31 */ | ||
/***/ (function(module, exports) { | ||
@@ -738,7 +774,7 @@ | ||
/***/ }), | ||
/* 29 */ | ||
/* 32 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isArray = __webpack_require__(0); | ||
var isPlainObject = __webpack_require__(7); | ||
var isPlainObject = __webpack_require__(8); | ||
var each = __webpack_require__(1); | ||
@@ -760,7 +796,7 @@ | ||
/***/ }), | ||
/* 30 */ | ||
/* 33 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isArrayLike = __webpack_require__(2); | ||
var pullAt = __webpack_require__(14); | ||
var pullAt = __webpack_require__(15); | ||
@@ -796,7 +832,7 @@ var remove = function remove(arr, predicate) { | ||
/***/ }), | ||
/* 31 */ | ||
/* 34 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var each = __webpack_require__(1); | ||
var toArray = __webpack_require__(9); | ||
var toArray = __webpack_require__(10); | ||
@@ -818,6 +854,6 @@ var union = function union() { | ||
/***/ }), | ||
/* 32 */ | ||
/* 35 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var contains = __webpack_require__(11); | ||
var contains = __webpack_require__(12); | ||
@@ -837,7 +873,7 @@ var uniq = function uniq(arr) { | ||
/***/ }), | ||
/* 33 */ | ||
/* 36 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var each = __webpack_require__(1); | ||
var isNil = __webpack_require__(6); | ||
var isNil = __webpack_require__(7); | ||
var isArray = __webpack_require__(0); | ||
@@ -869,3 +905,3 @@ | ||
/***/ }), | ||
/* 34 */ | ||
/* 37 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -875,8 +911,8 @@ | ||
module.exports = { | ||
getWrapBehavior: __webpack_require__(35), | ||
wrapBehavior: __webpack_require__(36) | ||
getWrapBehavior: __webpack_require__(38), | ||
wrapBehavior: __webpack_require__(39) | ||
}; | ||
/***/ }), | ||
/* 35 */ | ||
/* 38 */ | ||
/***/ (function(module, exports) { | ||
@@ -898,3 +934,3 @@ | ||
/***/ }), | ||
/* 36 */ | ||
/* 39 */ | ||
/***/ (function(module, exports) { | ||
@@ -923,26 +959,26 @@ | ||
/***/ }), | ||
/* 37 */ | ||
/* 40 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = { | ||
clamp: __webpack_require__(38), | ||
fixedBase: __webpack_require__(39), | ||
isDecimal: __webpack_require__(40), | ||
isEven: __webpack_require__(41), | ||
isInteger: __webpack_require__(42), | ||
isNegative: __webpack_require__(43), | ||
isNumberEqual: __webpack_require__(44), | ||
isOdd: __webpack_require__(45), | ||
isPositive: __webpack_require__(46), | ||
maxBy: __webpack_require__(47), | ||
minBy: __webpack_require__(48), | ||
mod: __webpack_require__(49), | ||
toDegree: __webpack_require__(50), | ||
toInt: __webpack_require__(15), | ||
toInteger: __webpack_require__(15), | ||
toRadian: __webpack_require__(51) | ||
clamp: __webpack_require__(41), | ||
fixedBase: __webpack_require__(42), | ||
isDecimal: __webpack_require__(43), | ||
isEven: __webpack_require__(44), | ||
isInteger: __webpack_require__(45), | ||
isNegative: __webpack_require__(46), | ||
isNumberEqual: __webpack_require__(47), | ||
isOdd: __webpack_require__(48), | ||
isPositive: __webpack_require__(49), | ||
maxBy: __webpack_require__(50), | ||
minBy: __webpack_require__(51), | ||
mod: __webpack_require__(52), | ||
toDegree: __webpack_require__(53), | ||
toInt: __webpack_require__(16), | ||
toInteger: __webpack_require__(16), | ||
toRadian: __webpack_require__(54) | ||
}; | ||
/***/ }), | ||
/* 38 */ | ||
/* 41 */ | ||
/***/ (function(module, exports) { | ||
@@ -962,3 +998,3 @@ | ||
/***/ }), | ||
/* 39 */ | ||
/* 42 */ | ||
/***/ (function(module, exports) { | ||
@@ -982,3 +1018,3 @@ | ||
/***/ }), | ||
/* 40 */ | ||
/* 43 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -995,3 +1031,3 @@ | ||
/***/ }), | ||
/* 41 */ | ||
/* 44 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1008,3 +1044,3 @@ | ||
/***/ }), | ||
/* 42 */ | ||
/* 45 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1021,3 +1057,3 @@ | ||
/***/ }), | ||
/* 43 */ | ||
/* 46 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1034,3 +1070,3 @@ | ||
/***/ }), | ||
/* 44 */ | ||
/* 47 */ | ||
/***/ (function(module, exports) { | ||
@@ -1047,3 +1083,3 @@ | ||
/***/ }), | ||
/* 45 */ | ||
/* 48 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1060,3 +1096,3 @@ | ||
/***/ }), | ||
/* 46 */ | ||
/* 49 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1073,3 +1109,3 @@ | ||
/***/ }), | ||
/* 47 */ | ||
/* 50 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1123,3 +1159,3 @@ | ||
/***/ }), | ||
/* 48 */ | ||
/* 51 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1173,3 +1209,3 @@ | ||
/***/ }), | ||
/* 49 */ | ||
/* 52 */ | ||
/***/ (function(module, exports) { | ||
@@ -1184,3 +1220,3 @@ | ||
/***/ }), | ||
/* 50 */ | ||
/* 53 */ | ||
/***/ (function(module, exports) { | ||
@@ -1197,3 +1233,3 @@ | ||
/***/ }), | ||
/* 51 */ | ||
/* 54 */ | ||
/***/ (function(module, exports) { | ||
@@ -1210,59 +1246,97 @@ | ||
/***/ }), | ||
/* 52 */ | ||
/***/ (function(module, exports) { | ||
/* 55 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
function toString(value) { | ||
return value.toString(); | ||
} | ||
var strUtil = { | ||
lc: __webpack_require__(56), | ||
lowerCase: __webpack_require__(17), | ||
lowerFirst: __webpack_require__(57), | ||
substitute: __webpack_require__(58), | ||
uc: __webpack_require__(59), | ||
upperCase: __webpack_require__(18), | ||
upperFirst: __webpack_require__(60) | ||
}; | ||
function upperCase(value) { | ||
return toString(value).toUpperCase(); | ||
} | ||
module.exports = strUtil; | ||
function lowerCase(value) { | ||
return toString(value).toLowerCase(); | ||
} | ||
/***/ }), | ||
/* 56 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var strUtil = { | ||
lc: lowerCase, | ||
lowerCase: lowerCase, | ||
lowerFirst: function lowerFirst(value) { | ||
value = toString(value); | ||
return lowerCase(value.charAt(0)) + value.substring(1); | ||
}, | ||
module.exports = __webpack_require__(17); | ||
uc: upperCase, | ||
upperCase: upperCase, | ||
upperFirst: function upperFirst(value) { | ||
value = toString(value); | ||
return upperCase(value.charAt(0)) + value.substring(1); | ||
/***/ }), | ||
/* 57 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var toString = __webpack_require__(6); | ||
var lowerFirst = function lowerFirst(value) { | ||
var str = toString(value); | ||
return str.charAt(0).toLowerCase() + str.substring(1); | ||
}; | ||
module.exports = lowerFirst; | ||
/***/ }), | ||
/* 58 */ | ||
/***/ (function(module, exports) { | ||
var substitute = function substitute(str, o) { | ||
if (!str || !o) { | ||
return str; | ||
} | ||
return str.replace(/\\?\{([^{}]+)\}/g, function (match, name) { | ||
if (match.charAt(0) === '\\') { | ||
return match.slice(1); | ||
} | ||
return o[name] === undefined ? '' : o[name]; | ||
}); | ||
}; | ||
module.exports = strUtil; | ||
module.exports = substitute; | ||
/***/ }), | ||
/* 53 */ | ||
/* 59 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
module.exports = __webpack_require__(18); | ||
/***/ }), | ||
/* 60 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var toString = __webpack_require__(6); | ||
var upperFirst = function upperFirst(value) { | ||
var str = toString(value); | ||
return str.charAt(0).toUpperCase() + str.substring(1); | ||
}; | ||
module.exports = upperFirst; | ||
/***/ }), | ||
/* 61 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isType = __webpack_require__(3); | ||
var checkType = { | ||
getType: __webpack_require__(16), | ||
getType: __webpack_require__(19), | ||
isArray: __webpack_require__(0), | ||
isArrayLike: __webpack_require__(2), | ||
isBoolean: __webpack_require__(54), | ||
isBoolean: __webpack_require__(62), | ||
isFunction: __webpack_require__(5), | ||
isNil: __webpack_require__(6), | ||
isNull: __webpack_require__(55), | ||
isNil: __webpack_require__(7), | ||
isNull: __webpack_require__(63), | ||
isNumber: __webpack_require__(4), | ||
isObject: __webpack_require__(12), | ||
isObjectLike: __webpack_require__(8), | ||
isPlainObject: __webpack_require__(7), | ||
isPrototype: __webpack_require__(17), | ||
isObject: __webpack_require__(13), | ||
isObjectLike: __webpack_require__(9), | ||
isPlainObject: __webpack_require__(8), | ||
isPrototype: __webpack_require__(20), | ||
isType: isType, | ||
isUndefined: __webpack_require__(56), | ||
isString: __webpack_require__(18), | ||
isRegExp: __webpack_require__(57) | ||
isUndefined: __webpack_require__(64), | ||
isString: __webpack_require__(21), | ||
isRegExp: __webpack_require__(65) | ||
}; | ||
@@ -1279,3 +1353,3 @@ | ||
/***/ }), | ||
/* 54 */ | ||
/* 62 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1298,3 +1372,3 @@ | ||
/***/ }), | ||
/* 55 */ | ||
/* 63 */ | ||
/***/ (function(module, exports) { | ||
@@ -1309,3 +1383,3 @@ | ||
/***/ }), | ||
/* 56 */ | ||
/* 64 */ | ||
/***/ (function(module, exports) { | ||
@@ -1320,3 +1394,3 @@ | ||
/***/ }), | ||
/* 57 */ | ||
/* 65 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1333,8 +1407,8 @@ | ||
/***/ }), | ||
/* 58 */ | ||
/* 66 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isFunction = __webpack_require__(5); | ||
var toArray = __webpack_require__(9); | ||
var mix = __webpack_require__(10); | ||
var toArray = __webpack_require__(10); | ||
var mix = __webpack_require__(11); | ||
@@ -1355,3 +1429,3 @@ var augment = function augment(c) { | ||
/***/ }), | ||
/* 59 */ | ||
/* 67 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1394,6 +1468,6 @@ | ||
/***/ }), | ||
/* 60 */ | ||
/* 68 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isPlainObject = __webpack_require__(7); | ||
var isPlainObject = __webpack_require__(8); | ||
var isArray = __webpack_require__(0); | ||
@@ -1444,7 +1518,7 @@ | ||
/***/ }), | ||
/* 61 */ | ||
/* 69 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isFunction = __webpack_require__(5); | ||
var mix = __webpack_require__(10); | ||
var mix = __webpack_require__(11); | ||
@@ -1484,6 +1558,6 @@ var extend = function extend(subclass, superclass, overrides, staticOverrides) { | ||
/***/ }), | ||
/* 62 */ | ||
/* 70 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var groupToMap = __webpack_require__(19); | ||
var groupToMap = __webpack_require__(22); | ||
@@ -1505,3 +1579,3 @@ var group = function group(data, condition) { | ||
/***/ }), | ||
/* 63 */ | ||
/* 71 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1533,9 +1607,9 @@ | ||
/***/ }), | ||
/* 64 */ | ||
/* 72 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isNil = __webpack_require__(6); | ||
var isNil = __webpack_require__(7); | ||
var isArrayLike = __webpack_require__(2); | ||
var getType = __webpack_require__(16); | ||
var isPrototype = __webpack_require__(17); | ||
var getType = __webpack_require__(19); | ||
var isPrototype = __webpack_require__(20); | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
@@ -1577,7 +1651,7 @@ | ||
/***/ }), | ||
/* 65 */ | ||
/* 73 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var isFunction = __webpack_require__(5); | ||
var isEqual = __webpack_require__(21); | ||
var isEqual = __webpack_require__(24); | ||
/** | ||
@@ -1616,3 +1690,3 @@ * @param {*} value The value to compare. | ||
/***/ }), | ||
/* 66 */ | ||
/* 74 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
@@ -1637,7 +1711,7 @@ | ||
/***/ }), | ||
/* 67 */ | ||
/* 75 */ | ||
/***/ (function(module, exports, __webpack_require__) { | ||
var each = __webpack_require__(1); | ||
var isPlaineObject = __webpack_require__(7); | ||
var isPlaineObject = __webpack_require__(8); | ||
@@ -1673,3 +1747,3 @@ var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
/***/ }), | ||
/* 68 */ | ||
/* 76 */ | ||
/***/ (function(module, exports) { | ||
@@ -1676,0 +1750,0 @@ |
@@ -35,2 +35,3 @@ | ||
toArray: require('./toArray'), | ||
toString: require('./toString'), | ||
uniqueId: require('./uniqueId') | ||
@@ -37,0 +38,0 @@ }; |
function toString(value) { | ||
return value.toString(); | ||
} | ||
function upperCase(value) { | ||
return toString(value).toUpperCase(); | ||
} | ||
function lowerCase(value) { | ||
return toString(value).toLowerCase(); | ||
} | ||
var strUtil = { | ||
lc: lowerCase, | ||
lowerCase: lowerCase, | ||
lowerFirst: function lowerFirst(value) { | ||
value = toString(value); | ||
return lowerCase(value.charAt(0)) + value.substring(1); | ||
}, | ||
uc: upperCase, | ||
upperCase: upperCase, | ||
upperFirst: function upperFirst(value) { | ||
value = toString(value); | ||
return upperCase(value.charAt(0)) + value.substring(1); | ||
} | ||
lc: require('./lc'), | ||
lowerCase: require('./lowerCase'), | ||
lowerFirst: require('./lowerFirst'), | ||
substitute: require('./substitute'), | ||
uc: require('./uc'), | ||
upperCase: require('./upperCase'), | ||
upperFirst: require('./upperFirst') | ||
}; | ||
module.exports = strUtil; |
@@ -1,10 +0,7 @@ | ||
var isString = require('../type/isString'); | ||
var toString = require('../toString'); | ||
var lowerCase = function lowerCase(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toLowerCase(); | ||
return toString(str).toLowerCase(); | ||
}; | ||
module.exports = lowerCase; |
@@ -1,10 +0,8 @@ | ||
var isString = require('../type/isString'); | ||
var toString = require('../toString'); | ||
var lowerFirst = function lowerFirst(value) { | ||
if (!isString(value)) { | ||
return value; | ||
} | ||
return value.charAt(0).toLowerCase() + value.substring(1); | ||
var str = toString(value); | ||
return str.charAt(0).toLowerCase() + str.substring(1); | ||
}; | ||
module.exports = lowerFirst; |
@@ -1,10 +0,7 @@ | ||
var isString = require('../type/isString'); | ||
var toString = require('../toString'); | ||
var upperCase = function upperCase(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toUpperCase(); | ||
return toString(str).toUpperCase(); | ||
}; | ||
module.exports = upperCase; |
@@ -1,10 +0,8 @@ | ||
var isString = require('../type/isString'); | ||
var toString = require('../toString'); | ||
var upperFirst = function upperFirst(value) { | ||
if (!isString(value)) { | ||
return value; | ||
} | ||
return value.charAt(0).toUpperCase() + value.substring(1); | ||
var str = toString(value); | ||
return str.charAt(0).toUpperCase() + str.substring(1); | ||
}; | ||
module.exports = upperFirst; |
{ | ||
"name": "@antv/util", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A common util collection for antv projects", | ||
@@ -5,0 +5,0 @@ "browser": "build/util.js", |
@@ -35,2 +35,3 @@ | ||
toArray: require('./toArray'), | ||
toString: require('./toString'), | ||
uniqueId: require('./uniqueId') | ||
@@ -37,0 +38,0 @@ }; |
function toString(value) { | ||
return value.toString(); | ||
} | ||
function upperCase(value) { | ||
return toString(value).toUpperCase(); | ||
} | ||
function lowerCase(value) { | ||
return toString(value).toLowerCase(); | ||
} | ||
const strUtil = { | ||
lc: lowerCase, | ||
lowerCase, | ||
lowerFirst(value) { | ||
value = toString(value); | ||
return lowerCase(value.charAt(0)) + value.substring(1); | ||
}, | ||
uc: upperCase, | ||
upperCase, | ||
upperFirst(value) { | ||
value = toString(value); | ||
return upperCase(value.charAt(0)) + value.substring(1); | ||
} | ||
lc: require('./lc'), | ||
lowerCase: require('./lowerCase'), | ||
lowerFirst: require('./lowerFirst'), | ||
substitute: require('./substitute'), | ||
uc: require('./uc'), | ||
upperCase: require('./upperCase'), | ||
upperFirst: require('./upperFirst') | ||
}; | ||
module.exports = strUtil; |
@@ -1,10 +0,7 @@ | ||
const isString = require('../type/isString'); | ||
const toString = require('../toString'); | ||
const lowerCase = function(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toLowerCase(); | ||
return toString(str).toLowerCase(); | ||
}; | ||
module.exports = lowerCase; |
@@ -1,10 +0,8 @@ | ||
const isString = require('../type/isString'); | ||
const toString = require('../toString'); | ||
const lowerFirst = function(value) { | ||
if (!isString(value)) { | ||
return value; | ||
} | ||
return value.charAt(0).toLowerCase() + value.substring(1); | ||
const str = toString(value); | ||
return str.charAt(0).toLowerCase() + str.substring(1); | ||
}; | ||
module.exports = lowerFirst; |
@@ -1,10 +0,7 @@ | ||
const isString = require('../type/isString'); | ||
const toString = require('../toString'); | ||
const upperCase = function(str) { | ||
if (!isString(str)) { | ||
return str; | ||
} | ||
return str.toString().toUpperCase(); | ||
return toString(str).toUpperCase(); | ||
}; | ||
module.exports = upperCase; |
@@ -1,10 +0,8 @@ | ||
const isString = require('../type/isString'); | ||
const toString = require('../toString'); | ||
const upperFirst = function(value) { | ||
if (!isString(value)) { | ||
return value; | ||
} | ||
return value.charAt(0).toUpperCase() + value.substring(1); | ||
const str = toString(value); | ||
return str.charAt(0).toUpperCase() + str.substring(1); | ||
}; | ||
module.exports = upperFirst; |
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
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
123745
173
3926