@visactor/vutils 0.9.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/README.zh-CN.md +0 -0
- package/cjs/angle.d.ts +12 -0
- package/cjs/angle.js +40 -0
- package/cjs/angle.js.map +1 -0
- package/cjs/color/Color.d.ts +181 -0
- package/cjs/color/Color.js +298 -0
- package/cjs/color/Color.js.map +1 -0
- package/cjs/color/hexToRgb.d.ts +1 -0
- package/cjs/color/hexToRgb.js +13 -0
- package/cjs/color/hexToRgb.js.map +1 -0
- package/cjs/color/hslToRgb.d.ts +5 -0
- package/cjs/color/hslToRgb.js +21 -0
- package/cjs/color/hslToRgb.js.map +1 -0
- package/cjs/color/index.d.ts +6 -0
- package/cjs/color/index.js +80 -0
- package/cjs/color/index.js.map +1 -0
- package/cjs/color/interpolate.d.ts +2 -0
- package/cjs/color/interpolate.js +18 -0
- package/cjs/color/interpolate.js.map +1 -0
- package/cjs/color/rgbToHex.d.ts +1 -0
- package/cjs/color/rgbToHex.js +10 -0
- package/cjs/color/rgbToHex.js.map +1 -0
- package/cjs/color/rgbToHsl.d.ts +5 -0
- package/cjs/color/rgbToHsl.js +19 -0
- package/cjs/color/rgbToHsl.js.map +1 -0
- package/cjs/common/array.d.ts +9 -0
- package/cjs/common/array.js +64 -0
- package/cjs/common/array.js.map +1 -0
- package/cjs/common/ascending.d.ts +1 -0
- package/cjs/common/ascending.js +10 -0
- package/cjs/common/ascending.js.map +1 -0
- package/cjs/common/bisect.d.ts +1 -0
- package/cjs/common/bisect.js +24 -0
- package/cjs/common/bisect.js.map +1 -0
- package/cjs/common/clamp.d.ts +2 -0
- package/cjs/common/clamp.js +12 -0
- package/cjs/common/clamp.js.map +1 -0
- package/cjs/common/clampRange.d.ts +2 -0
- package/cjs/common/clampRange.js +16 -0
- package/cjs/common/clampRange.js.map +1 -0
- package/cjs/common/clamper.d.ts +1 -0
- package/cjs/common/clamper.js +11 -0
- package/cjs/common/clamper.js.map +1 -0
- package/cjs/common/clone.d.ts +1 -0
- package/cjs/common/clone.js +42 -0
- package/cjs/common/clone.js.map +1 -0
- package/cjs/common/cloneDeep.d.ts +1 -0
- package/cjs/common/cloneDeep.js +31 -0
- package/cjs/common/cloneDeep.js.map +1 -0
- package/cjs/common/constant.d.ts +2 -0
- package/cjs/common/constant.js +17 -0
- package/cjs/common/constant.js.map +1 -0
- package/cjs/common/debounce.d.ts +7 -0
- package/cjs/common/debounce.js +76 -0
- package/cjs/common/debounce.js.map +1 -0
- package/cjs/common/deviation.d.ts +1 -0
- package/cjs/common/deviation.js +15 -0
- package/cjs/common/deviation.js.map +1 -0
- package/cjs/common/get.d.ts +3 -0
- package/cjs/common/get.js +20 -0
- package/cjs/common/get.js.map +1 -0
- package/cjs/common/getType.d.ts +2 -0
- package/cjs/common/getType.js +9 -0
- package/cjs/common/getType.js.map +1 -0
- package/cjs/common/has.d.ts +3 -0
- package/cjs/common/has.js +10 -0
- package/cjs/common/has.js.map +1 -0
- package/cjs/common/index.d.ts +56 -0
- package/cjs/common/index.js +485 -0
- package/cjs/common/index.js.map +1 -0
- package/cjs/common/interpolate.d.ts +4 -0
- package/cjs/common/interpolate.js +55 -0
- package/cjs/common/interpolate.js.map +1 -0
- package/cjs/common/isArray.d.ts +2 -0
- package/cjs/common/isArray.js +17 -0
- package/cjs/common/isArray.js.map +1 -0
- package/cjs/common/isArrayLike.d.ts +2 -0
- package/cjs/common/isArrayLike.js +12 -0
- package/cjs/common/isArrayLike.js.map +1 -0
- package/cjs/common/isBase64.d.ts +2 -0
- package/cjs/common/isBase64.js +10 -0
- package/cjs/common/isBase64.js.map +1 -0
- package/cjs/common/isBoolean.d.ts +2 -0
- package/cjs/common/isBoolean.js +17 -0
- package/cjs/common/isBoolean.js.map +1 -0
- package/cjs/common/isDate.d.ts +2 -0
- package/cjs/common/isDate.js +16 -0
- package/cjs/common/isDate.js.map +1 -0
- package/cjs/common/isEmpty.d.ts +2 -0
- package/cjs/common/isEmpty.js +26 -0
- package/cjs/common/isEmpty.js.map +1 -0
- package/cjs/common/isEqual.d.ts +1 -0
- package/cjs/common/isEqual.js +49 -0
- package/cjs/common/isEqual.js.map +1 -0
- package/cjs/common/isFunction.d.ts +2 -0
- package/cjs/common/isFunction.js +10 -0
- package/cjs/common/isFunction.js.map +1 -0
- package/cjs/common/isNil.d.ts +2 -0
- package/cjs/common/isNil.js +10 -0
- package/cjs/common/isNil.js.map +1 -0
- package/cjs/common/isNull.d.ts +2 -0
- package/cjs/common/isNull.js +10 -0
- package/cjs/common/isNull.js.map +1 -0
- package/cjs/common/isNumber.d.ts +2 -0
- package/cjs/common/isNumber.js +19 -0
- package/cjs/common/isNumber.js.map +1 -0
- package/cjs/common/isNumeric.d.ts +2 -0
- package/cjs/common/isNumeric.js +10 -0
- package/cjs/common/isNumeric.js.map +1 -0
- package/cjs/common/isObject.d.ts +2 -0
- package/cjs/common/isObject.js +12 -0
- package/cjs/common/isObject.js.map +1 -0
- package/cjs/common/isObjectLike.d.ts +2 -0
- package/cjs/common/isObjectLike.js +10 -0
- package/cjs/common/isObjectLike.js.map +1 -0
- package/cjs/common/isPlainObject.d.ts +2 -0
- package/cjs/common/isPlainObject.js +22 -0
- package/cjs/common/isPlainObject.js.map +1 -0
- package/cjs/common/isPrototype.d.ts +2 -0
- package/cjs/common/isPrototype.js +13 -0
- package/cjs/common/isPrototype.js.map +1 -0
- package/cjs/common/isRegExp.d.ts +2 -0
- package/cjs/common/isRegExp.js +16 -0
- package/cjs/common/isRegExp.js.map +1 -0
- package/cjs/common/isShallowEqual.d.ts +1 -0
- package/cjs/common/isShallowEqual.js +34 -0
- package/cjs/common/isShallowEqual.js.map +1 -0
- package/cjs/common/isString.d.ts +2 -0
- package/cjs/common/isString.js +19 -0
- package/cjs/common/isString.js.map +1 -0
- package/cjs/common/isType.d.ts +2 -0
- package/cjs/common/isType.js +10 -0
- package/cjs/common/isType.js.map +1 -0
- package/cjs/common/isUndefined.d.ts +2 -0
- package/cjs/common/isUndefined.js +10 -0
- package/cjs/common/isUndefined.js.map +1 -0
- package/cjs/common/isValid.d.ts +2 -0
- package/cjs/common/isValid.js +10 -0
- package/cjs/common/isValid.js.map +1 -0
- package/cjs/common/isValidNumber.d.ts +2 -0
- package/cjs/common/isValidNumber.js +17 -0
- package/cjs/common/isValidNumber.js.map +1 -0
- package/cjs/common/isValidUrl.d.ts +2 -0
- package/cjs/common/isValidUrl.js +10 -0
- package/cjs/common/isValidUrl.js.map +1 -0
- package/cjs/common/lowerFirst.d.ts +2 -0
- package/cjs/common/lowerFirst.js +12 -0
- package/cjs/common/lowerFirst.js.map +1 -0
- package/cjs/common/median.d.ts +1 -0
- package/cjs/common/median.js +13 -0
- package/cjs/common/median.js.map +1 -0
- package/cjs/common/merge.d.ts +1 -0
- package/cjs/common/merge.js +63 -0
- package/cjs/common/merge.js.map +1 -0
- package/cjs/common/mixin.d.ts +5 -0
- package/cjs/common/mixin.js +35 -0
- package/cjs/common/mixin.js.map +1 -0
- package/cjs/common/number.d.ts +3 -0
- package/cjs/common/number.js +23 -0
- package/cjs/common/number.js.map +1 -0
- package/cjs/common/pad.d.ts +2 -0
- package/cjs/common/pad.js +17 -0
- package/cjs/common/pad.js.map +1 -0
- package/cjs/common/pick.d.ts +1 -0
- package/cjs/common/pick.js +24 -0
- package/cjs/common/pick.js.map +1 -0
- package/cjs/common/pickWithout.d.ts +1 -0
- package/cjs/common/pickWithout.js +28 -0
- package/cjs/common/pickWithout.js.map +1 -0
- package/cjs/common/quantileSorted.d.ts +1 -0
- package/cjs/common/quantileSorted.js +19 -0
- package/cjs/common/quantileSorted.js.map +1 -0
- package/cjs/common/range.d.ts +1 -0
- package/cjs/common/range.js +24 -0
- package/cjs/common/range.js.map +1 -0
- package/cjs/common/throttle.d.ts +5 -0
- package/cjs/common/throttle.js +27 -0
- package/cjs/common/throttle.js.map +1 -0
- package/cjs/common/tickStep.d.ts +1 -0
- package/cjs/common/tickStep.js +18 -0
- package/cjs/common/tickStep.js.map +1 -0
- package/cjs/common/toDate.d.ts +2 -0
- package/cjs/common/toDate.js +28 -0
- package/cjs/common/toDate.js.map +1 -0
- package/cjs/common/toNumber.d.ts +1 -0
- package/cjs/common/toNumber.js +10 -0
- package/cjs/common/toNumber.js.map +1 -0
- package/cjs/common/toValidNumber.d.ts +1 -0
- package/cjs/common/toValidNumber.js +22 -0
- package/cjs/common/toValidNumber.js.map +1 -0
- package/cjs/common/truncate.d.ts +2 -0
- package/cjs/common/truncate.js +19 -0
- package/cjs/common/truncate.js.map +1 -0
- package/cjs/common/upperFirst.d.ts +2 -0
- package/cjs/common/upperFirst.js +12 -0
- package/cjs/common/upperFirst.js.map +1 -0
- package/cjs/common/uuid.d.ts +2 -0
- package/cjs/common/uuid.js +19 -0
- package/cjs/common/uuid.js.map +1 -0
- package/cjs/common/variance.d.ts +1 -0
- package/cjs/common/variance.js +17 -0
- package/cjs/common/variance.js.map +1 -0
- package/cjs/data-structure/bounds.d.ts +81 -0
- package/cjs/data-structure/bounds.js +139 -0
- package/cjs/data-structure/bounds.js.map +1 -0
- package/cjs/data-structure/hashTable.d.ts +35 -0
- package/cjs/data-structure/hashTable.js +114 -0
- package/cjs/data-structure/hashTable.js.map +1 -0
- package/cjs/data-structure/index.d.ts +4 -0
- package/cjs/data-structure/index.js +22 -0
- package/cjs/data-structure/index.js.map +1 -0
- package/cjs/data-structure/matrix.d.ts +80 -0
- package/cjs/data-structure/matrix.js +113 -0
- package/cjs/data-structure/matrix.js.map +1 -0
- package/cjs/data-structure/point.d.ts +62 -0
- package/cjs/data-structure/point.js +81 -0
- package/cjs/data-structure/point.js.map +1 -0
- package/cjs/dom.d.ts +10 -0
- package/cjs/dom.js +86 -0
- package/cjs/dom.js.map +1 -0
- package/cjs/geo/index.d.ts +2 -0
- package/cjs/geo/index.js +21 -0
- package/cjs/geo/index.js.map +1 -0
- package/cjs/geo/interface.d.ts +1 -0
- package/cjs/geo/interface.js +6 -0
- package/cjs/geo/interface.js.map +1 -0
- package/cjs/geo/invariant.d.ts +9 -0
- package/cjs/geo/invariant.js +45 -0
- package/cjs/geo/invariant.js.map +1 -0
- package/cjs/graphics/algorithm/aabb.d.ts +6 -0
- package/cjs/graphics/algorithm/aabb.js +58 -0
- package/cjs/graphics/algorithm/aabb.js.map +1 -0
- package/cjs/graphics/algorithm/index.d.ts +3 -0
- package/cjs/graphics/algorithm/index.js +22 -0
- package/cjs/graphics/algorithm/index.js.map +1 -0
- package/cjs/graphics/algorithm/interface.d.ts +20 -0
- package/cjs/graphics/algorithm/interface.js +6 -0
- package/cjs/graphics/algorithm/interface.js.map +1 -0
- package/cjs/graphics/algorithm/intersect.d.ts +25 -0
- package/cjs/graphics/algorithm/intersect.js +143 -0
- package/cjs/graphics/algorithm/intersect.js.map +1 -0
- package/cjs/graphics/algorithm/obb.d.ts +5 -0
- package/cjs/graphics/algorithm/obb.js +80 -0
- package/cjs/graphics/algorithm/obb.js.map +1 -0
- package/cjs/graphics/graph-util.d.ts +23 -0
- package/cjs/graphics/graph-util.js +47 -0
- package/cjs/graphics/graph-util.js.map +1 -0
- package/cjs/graphics/image.d.ts +2 -0
- package/cjs/graphics/image.js +18 -0
- package/cjs/graphics/image.js.map +1 -0
- package/cjs/graphics/index.d.ts +5 -0
- package/cjs/graphics/index.js +23 -0
- package/cjs/graphics/index.js.map +1 -0
- package/cjs/graphics/polygon.d.ts +5 -0
- package/cjs/graphics/polygon.js +54 -0
- package/cjs/graphics/polygon.js.map +1 -0
- package/cjs/graphics/text/index.d.ts +2 -0
- package/cjs/graphics/text/index.js +39 -0
- package/cjs/graphics/text/index.js.map +1 -0
- package/cjs/graphics/text/measure/index.d.ts +4 -0
- package/cjs/graphics/text/measure/index.js +22 -0
- package/cjs/graphics/text/measure/index.js.map +1 -0
- package/cjs/graphics/text/measure/interface.d.ts +31 -0
- package/cjs/graphics/text/measure/interface.js +6 -0
- package/cjs/graphics/text/measure/interface.js.map +1 -0
- package/cjs/graphics/text/measure/test.d.ts +14 -0
- package/cjs/graphics/text/measure/test.js +67 -0
- package/cjs/graphics/text/measure/test.js.map +1 -0
- package/cjs/graphics/text/measure/textMeasure.d.ts +38 -0
- package/cjs/graphics/text/measure/textMeasure.js +183 -0
- package/cjs/graphics/text/measure/textMeasure.js.map +1 -0
- package/cjs/graphics/text/measure/util.d.ts +2 -0
- package/cjs/graphics/text/measure/util.js +11 -0
- package/cjs/graphics/text/measure/util.js.map +1 -0
- package/cjs/graphics/text/stringWidth.d.ts +2 -0
- package/cjs/graphics/text/stringWidth.js +49 -0
- package/cjs/graphics/text/stringWidth.js.map +1 -0
- package/cjs/index.d.ts +15 -0
- package/cjs/index.js +47 -0
- package/cjs/index.js.map +1 -0
- package/cjs/logger.d.ts +12 -0
- package/cjs/logger.js +36 -0
- package/cjs/logger.js.map +1 -0
- package/cjs/lru.d.ts +25 -0
- package/cjs/lru.js +43 -0
- package/cjs/lru.js.map +1 -0
- package/cjs/math.d.ts +66 -0
- package/cjs/math.js +57 -0
- package/cjs/math.js.map +1 -0
- package/cjs/padding.d.ts +7 -0
- package/cjs/padding.js +41 -0
- package/cjs/padding.js.map +1 -0
- package/cjs/time/formatUtils.d.ts +17 -0
- package/cjs/time/formatUtils.js +95 -0
- package/cjs/time/formatUtils.js.map +1 -0
- package/cjs/time/index.d.ts +2 -0
- package/cjs/time/index.js +21 -0
- package/cjs/time/index.js.map +1 -0
- package/cjs/time/interval.d.ts +77 -0
- package/cjs/time/interval.js +324 -0
- package/cjs/time/interval.js.map +1 -0
- package/cjs/type.d.ts +5 -0
- package/cjs/type.js +6 -0
- package/cjs/type.js.map +1 -0
- package/dist/visactor_vutils.js +1 -0
- package/dist/visactor_vutils.min.js +1 -0
- package/es/angle.d.ts +12 -0
- package/es/angle.js +31 -0
- package/es/angle.js.map +1 -0
- package/es/color/Color.d.ts +181 -0
- package/es/color/Color.js +283 -0
- package/es/color/Color.js.map +1 -0
- package/es/color/hexToRgb.d.ts +1 -0
- package/es/color/hexToRgb.js +7 -0
- package/es/color/hexToRgb.js.map +1 -0
- package/es/color/hslToRgb.d.ts +5 -0
- package/es/color/hslToRgb.js +15 -0
- package/es/color/hslToRgb.js.map +1 -0
- package/es/color/index.d.ts +6 -0
- package/es/color/index.js +12 -0
- package/es/color/index.js.map +1 -0
- package/es/color/interpolate.d.ts +2 -0
- package/es/color/interpolate.js +10 -0
- package/es/color/interpolate.js.map +1 -0
- package/es/color/rgbToHex.d.ts +1 -0
- package/es/color/rgbToHex.js +4 -0
- package/es/color/rgbToHex.js.map +1 -0
- package/es/color/rgbToHsl.d.ts +5 -0
- package/es/color/rgbToHsl.js +13 -0
- package/es/color/rgbToHsl.js.map +1 -0
- package/es/common/array.d.ts +9 -0
- package/es/common/array.js +50 -0
- package/es/common/array.js.map +1 -0
- package/es/common/ascending.d.ts +1 -0
- package/es/common/ascending.js +4 -0
- package/es/common/ascending.js.map +1 -0
- package/es/common/bisect.d.ts +1 -0
- package/es/common/bisect.js +12 -0
- package/es/common/bisect.js.map +1 -0
- package/es/common/clamp.d.ts +2 -0
- package/es/common/clamp.js +6 -0
- package/es/common/clamp.js.map +1 -0
- package/es/common/clampRange.d.ts +2 -0
- package/es/common/clampRange.js +10 -0
- package/es/common/clampRange.js.map +1 -0
- package/es/common/clamper.d.ts +1 -0
- package/es/common/clamper.js +5 -0
- package/es/common/clamper.js.map +1 -0
- package/es/common/clone.d.ts +1 -0
- package/es/common/clone.js +32 -0
- package/es/common/clone.js.map +1 -0
- package/es/common/cloneDeep.d.ts +1 -0
- package/es/common/cloneDeep.js +26 -0
- package/es/common/cloneDeep.js.map +1 -0
- package/es/common/constant.d.ts +2 -0
- package/es/common/constant.js +6 -0
- package/es/common/constant.js.map +1 -0
- package/es/common/debounce.d.ts +7 -0
- package/es/common/debounce.js +68 -0
- package/es/common/debounce.js.map +1 -0
- package/es/common/deviation.d.ts +1 -0
- package/es/common/deviation.js +7 -0
- package/es/common/deviation.js.map +1 -0
- package/es/common/get.d.ts +3 -0
- package/es/common/get.js +10 -0
- package/es/common/get.js.map +1 -0
- package/es/common/getType.d.ts +2 -0
- package/es/common/getType.js +3 -0
- package/es/common/getType.js.map +1 -0
- package/es/common/has.d.ts +3 -0
- package/es/common/has.js +4 -0
- package/es/common/has.js.map +1 -0
- package/es/common/index.d.ts +56 -0
- package/es/common/index.js +112 -0
- package/es/common/index.js.map +1 -0
- package/es/common/interpolate.d.ts +4 -0
- package/es/common/interpolate.js +45 -0
- package/es/common/interpolate.js.map +1 -0
- package/es/common/isArray.d.ts +2 -0
- package/es/common/isArray.js +6 -0
- package/es/common/isArray.js.map +1 -0
- package/es/common/isArrayLike.d.ts +2 -0
- package/es/common/isArrayLike.js +6 -0
- package/es/common/isArrayLike.js.map +1 -0
- package/es/common/isBase64.d.ts +2 -0
- package/es/common/isBase64.js +4 -0
- package/es/common/isBase64.js.map +1 -0
- package/es/common/isBoolean.d.ts +2 -0
- package/es/common/isBoolean.js +6 -0
- package/es/common/isBoolean.js.map +1 -0
- package/es/common/isDate.d.ts +2 -0
- package/es/common/isDate.js +6 -0
- package/es/common/isDate.js.map +1 -0
- package/es/common/isEmpty.d.ts +2 -0
- package/es/common/isEmpty.js +22 -0
- package/es/common/isEmpty.js.map +1 -0
- package/es/common/isEqual.d.ts +1 -0
- package/es/common/isEqual.js +39 -0
- package/es/common/isEqual.js.map +1 -0
- package/es/common/isFunction.d.ts +2 -0
- package/es/common/isFunction.js +4 -0
- package/es/common/isFunction.js.map +1 -0
- package/es/common/isNil.d.ts +2 -0
- package/es/common/isNil.js +4 -0
- package/es/common/isNil.js.map +1 -0
- package/es/common/isNull.d.ts +2 -0
- package/es/common/isNull.js +4 -0
- package/es/common/isNull.js.map +1 -0
- package/es/common/isNumber.d.ts +2 -0
- package/es/common/isNumber.js +9 -0
- package/es/common/isNumber.js.map +1 -0
- package/es/common/isNumeric.d.ts +2 -0
- package/es/common/isNumeric.js +4 -0
- package/es/common/isNumeric.js.map +1 -0
- package/es/common/isObject.d.ts +2 -0
- package/es/common/isObject.js +6 -0
- package/es/common/isObject.js.map +1 -0
- package/es/common/isObjectLike.d.ts +2 -0
- package/es/common/isObjectLike.js +4 -0
- package/es/common/isObjectLike.js.map +1 -0
- package/es/common/isPlainObject.d.ts +2 -0
- package/es/common/isPlainObject.js +14 -0
- package/es/common/isPlainObject.js.map +1 -0
- package/es/common/isPrototype.d.ts +2 -0
- package/es/common/isPrototype.js +7 -0
- package/es/common/isPrototype.js.map +1 -0
- package/es/common/isRegExp.d.ts +2 -0
- package/es/common/isRegExp.js +6 -0
- package/es/common/isRegExp.js.map +1 -0
- package/es/common/isShallowEqual.d.ts +1 -0
- package/es/common/isShallowEqual.js +22 -0
- package/es/common/isShallowEqual.js.map +1 -0
- package/es/common/isString.d.ts +2 -0
- package/es/common/isString.js +9 -0
- package/es/common/isString.js.map +1 -0
- package/es/common/isType.d.ts +2 -0
- package/es/common/isType.js +4 -0
- package/es/common/isType.js.map +1 -0
- package/es/common/isUndefined.d.ts +2 -0
- package/es/common/isUndefined.js +4 -0
- package/es/common/isUndefined.js.map +1 -0
- package/es/common/isValid.d.ts +2 -0
- package/es/common/isValid.js +4 -0
- package/es/common/isValid.js.map +1 -0
- package/es/common/isValidNumber.d.ts +2 -0
- package/es/common/isValidNumber.js +6 -0
- package/es/common/isValidNumber.js.map +1 -0
- package/es/common/isValidUrl.d.ts +2 -0
- package/es/common/isValidUrl.js +4 -0
- package/es/common/isValidUrl.js.map +1 -0
- package/es/common/lowerFirst.d.ts +2 -0
- package/es/common/lowerFirst.js +6 -0
- package/es/common/lowerFirst.js.map +1 -0
- package/es/common/median.d.ts +1 -0
- package/es/common/median.js +9 -0
- package/es/common/median.js.map +1 -0
- package/es/common/merge.d.ts +1 -0
- package/es/common/merge.js +54 -0
- package/es/common/merge.js.map +1 -0
- package/es/common/mixin.d.ts +5 -0
- package/es/common/mixin.js +28 -0
- package/es/common/mixin.js.map +1 -0
- package/es/common/number.d.ts +3 -0
- package/es/common/number.js +15 -0
- package/es/common/number.js.map +1 -0
- package/es/common/pad.d.ts +2 -0
- package/es/common/pad.js +11 -0
- package/es/common/pad.js.map +1 -0
- package/es/common/pick.d.ts +1 -0
- package/es/common/pick.js +12 -0
- package/es/common/pick.js.map +1 -0
- package/es/common/pickWithout.d.ts +1 -0
- package/es/common/pickWithout.js +16 -0
- package/es/common/pickWithout.js.map +1 -0
- package/es/common/quantileSorted.d.ts +1 -0
- package/es/common/quantileSorted.js +11 -0
- package/es/common/quantileSorted.js.map +1 -0
- package/es/common/range.d.ts +1 -0
- package/es/common/range.js +10 -0
- package/es/common/range.js.map +1 -0
- package/es/common/throttle.d.ts +5 -0
- package/es/common/throttle.js +17 -0
- package/es/common/throttle.js.map +1 -0
- package/es/common/tickStep.d.ts +1 -0
- package/es/common/tickStep.js +10 -0
- package/es/common/tickStep.js.map +1 -0
- package/es/common/toDate.d.ts +2 -0
- package/es/common/toDate.js +18 -0
- package/es/common/toDate.js.map +1 -0
- package/es/common/toNumber.d.ts +1 -0
- package/es/common/toNumber.js +4 -0
- package/es/common/toNumber.js.map +1 -0
- package/es/common/toValidNumber.d.ts +1 -0
- package/es/common/toValidNumber.js +8 -0
- package/es/common/toValidNumber.js.map +1 -0
- package/es/common/truncate.d.ts +2 -0
- package/es/common/truncate.js +9 -0
- package/es/common/truncate.js.map +1 -0
- package/es/common/upperFirst.d.ts +2 -0
- package/es/common/upperFirst.js +6 -0
- package/es/common/upperFirst.js.map +1 -0
- package/es/common/uuid.d.ts +2 -0
- package/es/common/uuid.js +13 -0
- package/es/common/uuid.js.map +1 -0
- package/es/common/variance.d.ts +1 -0
- package/es/common/variance.js +11 -0
- package/es/common/variance.js.map +1 -0
- package/es/data-structure/bounds.d.ts +81 -0
- package/es/data-structure/bounds.js +127 -0
- package/es/data-structure/bounds.js.map +1 -0
- package/es/data-structure/hashTable.d.ts +35 -0
- package/es/data-structure/hashTable.js +104 -0
- package/es/data-structure/hashTable.js.map +1 -0
- package/es/data-structure/index.d.ts +4 -0
- package/es/data-structure/index.js +8 -0
- package/es/data-structure/index.js.map +1 -0
- package/es/data-structure/matrix.d.ts +80 -0
- package/es/data-structure/matrix.js +106 -0
- package/es/data-structure/matrix.js.map +1 -0
- package/es/data-structure/point.d.ts +62 -0
- package/es/data-structure/point.js +65 -0
- package/es/data-structure/point.js.map +1 -0
- package/es/dom.d.ts +10 -0
- package/es/dom.js +75 -0
- package/es/dom.js.map +1 -0
- package/es/geo/index.d.ts +2 -0
- package/es/geo/index.js +4 -0
- package/es/geo/index.js.map +1 -0
- package/es/geo/interface.d.ts +1 -0
- package/es/geo/interface.js +2 -0
- package/es/geo/interface.js.map +1 -0
- package/es/geo/invariant.d.ts +9 -0
- package/es/geo/invariant.js +40 -0
- package/es/geo/invariant.js.map +1 -0
- package/es/graphics/algorithm/aabb.d.ts +6 -0
- package/es/graphics/algorithm/aabb.js +49 -0
- package/es/graphics/algorithm/aabb.js.map +1 -0
- package/es/graphics/algorithm/index.d.ts +3 -0
- package/es/graphics/algorithm/index.js +6 -0
- package/es/graphics/algorithm/index.js.map +1 -0
- package/es/graphics/algorithm/interface.d.ts +20 -0
- package/es/graphics/algorithm/interface.js +2 -0
- package/es/graphics/algorithm/interface.js.map +1 -0
- package/es/graphics/algorithm/intersect.d.ts +25 -0
- package/es/graphics/algorithm/intersect.js +135 -0
- package/es/graphics/algorithm/intersect.js.map +1 -0
- package/es/graphics/algorithm/obb.d.ts +5 -0
- package/es/graphics/algorithm/obb.js +68 -0
- package/es/graphics/algorithm/obb.js.map +1 -0
- package/es/graphics/graph-util.d.ts +23 -0
- package/es/graphics/graph-util.js +39 -0
- package/es/graphics/graph-util.js.map +1 -0
- package/es/graphics/image.d.ts +2 -0
- package/es/graphics/image.js +12 -0
- package/es/graphics/image.js.map +1 -0
- package/es/graphics/index.d.ts +5 -0
- package/es/graphics/index.js +10 -0
- package/es/graphics/index.js.map +1 -0
- package/es/graphics/polygon.d.ts +5 -0
- package/es/graphics/polygon.js +47 -0
- package/es/graphics/polygon.js.map +1 -0
- package/es/graphics/text/index.d.ts +2 -0
- package/es/graphics/text/index.js +4 -0
- package/es/graphics/text/index.js.map +1 -0
- package/es/graphics/text/measure/index.d.ts +4 -0
- package/es/graphics/text/measure/index.js +8 -0
- package/es/graphics/text/measure/index.js.map +1 -0
- package/es/graphics/text/measure/interface.d.ts +31 -0
- package/es/graphics/text/measure/interface.js +2 -0
- package/es/graphics/text/measure/interface.js.map +1 -0
- package/es/graphics/text/measure/test.d.ts +14 -0
- package/es/graphics/text/measure/test.js +65 -0
- package/es/graphics/text/measure/test.js.map +1 -0
- package/es/graphics/text/measure/textMeasure.d.ts +38 -0
- package/es/graphics/text/measure/textMeasure.js +181 -0
- package/es/graphics/text/measure/textMeasure.js.map +1 -0
- package/es/graphics/text/measure/util.d.ts +2 -0
- package/es/graphics/text/measure/util.js +5 -0
- package/es/graphics/text/measure/util.js.map +1 -0
- package/es/graphics/text/stringWidth.d.ts +2 -0
- package/es/graphics/text/stringWidth.js +43 -0
- package/es/graphics/text/stringWidth.js.map +1 -0
- package/es/index.d.ts +15 -0
- package/es/index.js +30 -0
- package/es/index.js.map +1 -0
- package/es/logger.d.ts +12 -0
- package/es/logger.js +38 -0
- package/es/logger.js.map +1 -0
- package/es/lru.d.ts +25 -0
- package/es/lru.js +36 -0
- package/es/lru.js.map +1 -0
- package/es/math.d.ts +66 -0
- package/es/math.js +76 -0
- package/es/math.js.map +1 -0
- package/es/padding.d.ts +7 -0
- package/es/padding.js +31 -0
- package/es/padding.js.map +1 -0
- package/es/time/formatUtils.d.ts +17 -0
- package/es/time/formatUtils.js +72 -0
- package/es/time/formatUtils.js.map +1 -0
- package/es/time/index.d.ts +2 -0
- package/es/time/index.js +4 -0
- package/es/time/index.js.map +1 -0
- package/es/time/interval.d.ts +77 -0
- package/es/time/interval.js +227 -0
- package/es/time/interval.js.map +1 -0
- package/es/type.d.ts +5 -0
- package/es/type.js +2 -0
- package/es/type.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function interpolateNumber(a, b) {
|
|
4
|
+
return t => a * (1 - t) + b * t;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function interpolateNumberRound(a, b) {
|
|
8
|
+
return function(t) {
|
|
9
|
+
return Math.round(a * (1 - t) + b * t);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function interpolateDate(a, b) {
|
|
14
|
+
const aVal = a.valueOf(), bVal = b.valueOf(), d = new Date;
|
|
15
|
+
return t => (d.setTime(aVal * (1 - t) + bVal * t), d);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), exports.interpolateString = exports.interpolateDate = exports.interpolateNumberRound = exports.interpolateNumber = void 0,
|
|
21
|
+
exports.interpolateNumber = interpolateNumber, exports.interpolateNumberRound = interpolateNumberRound,
|
|
22
|
+
exports.interpolateDate = interpolateDate;
|
|
23
|
+
|
|
24
|
+
const reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g");
|
|
25
|
+
|
|
26
|
+
function zero(b) {
|
|
27
|
+
return function() {
|
|
28
|
+
return b;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function one(b) {
|
|
33
|
+
return function(t) {
|
|
34
|
+
return b(t) + "";
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function interpolateString(a, b) {
|
|
39
|
+
let am, bm, bs, bi = reA.lastIndex = reB.lastIndex = 0, i = -1;
|
|
40
|
+
const s = [], q = [];
|
|
41
|
+
for (a += "", b += ""; (am = reA.exec(a)) && (bm = reB.exec(b)); ) (bs = bm.index) > bi && (bs = b.slice(bi, bs),
|
|
42
|
+
s[i] ? s[i] += bs : s[++i] = bs), (am = am[0]) === (bm = bm[0]) ? s[i] ? s[i] += bm : s[++i] = bm : (s[++i] = null,
|
|
43
|
+
q.push({
|
|
44
|
+
i: i,
|
|
45
|
+
x: interpolateNumber(am, bm)
|
|
46
|
+
})), bi = reB.lastIndex;
|
|
47
|
+
return bi < b.length && (bs = b.slice(bi), s[i] ? s[i] += bs : s[++i] = bs), s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length,
|
|
48
|
+
function(t) {
|
|
49
|
+
for (let o, i = 0; i < b; ++i) s[(o = q[i]).i] = o.x(t);
|
|
50
|
+
return s.join("");
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
exports.interpolateString = interpolateString;
|
|
55
|
+
//# sourceMappingURL=interpolate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/interpolate.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAAC,CAAS,EAAE,CAAS;IACpD,OAAO,CAAC,CAAS,EAAE,EAAE;QACnB,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC;AAJD,8CAIC;AAED,SAAgB,sBAAsB,CAAC,CAAS,EAAE,CAAS;IACzD,OAAO,UAAU,CAAC;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC;AACJ,CAAC;AAJD,wDAIC;AAED,SAAgB,eAAe,CAAC,CAAO,EAAE,CAAO;IAC9C,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;IAEzB,MAAM,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;IACrB,OAAO,CAAC,CAAS,EAAE,EAAE;QACnB,CAAC,CAAC,OAAO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M;gBACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;oBAC7B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC1B;gBACD,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpB,CAAC,CAAC,CAAC;AACT,CAAC;AAhED,8CAgEC","file":"interpolate.js","sourcesContent":["export function interpolateNumber(a: number, b: number): (x: number) => number {\n return (t: number) => {\n return a * (1 - t) + b * t;\n };\n}\n\nexport function interpolateNumberRound(a: number, b: number): (x: number) => number {\n return function (t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n\nexport function interpolateDate(a: Date, b: Date) {\n const aVal = a.valueOf();\n const bVal = b.valueOf();\n\n const d = new Date();\n return (t: number) => {\n d.setTime(aVal * (1 - t) + bVal * t);\n return d;\n };\n}\n\nconst reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g;\nconst reB = new RegExp(reA.source, 'g');\n\nfunction zero(b: any) {\n return function () {\n return b;\n };\n}\n\nfunction one(b: any) {\n return function (t: any) {\n return b(t) + '';\n };\n}\n\nexport function interpolateString(a: any, b: any) {\n let bi = (reA.lastIndex = reB.lastIndex = 0); // scan index for next number in b\n let am: any; // current match in a\n let bm: any; // current match in b\n let bs; // string preceding current number in b, if any\n let i = -1; // index in s\n const s: any[] = []; // string constants and placeholders\n const q: any[] = []; // number interpolators\n\n // Coerce inputs to strings.\n (a = a + ''), (b = b + '');\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) {\n // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) {\n s[i] += bs;\n } // coalesce with previous string\n else {\n s[++i] = bs;\n }\n }\n if ((am = am[0]) === (bm = bm[0])) {\n // numbers in a & b match\n if (s[i]) {\n s[i] += bm;\n } // coalesce with previous string\n else {\n s[++i] = bm;\n }\n } else {\n // interpolate non-matching numbers\n s[++i] = null;\n q.push({ i: i, x: interpolateNumber(am, bm) });\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) {\n s[i] += bs;\n } // coalesce with previous string\n else {\n s[++i] = bs;\n }\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2\n ? q[0]\n ? one(q[0].x)\n : zero(b)\n : ((b = q.length),\n function (t: any) {\n for (let i = 0, o; i < b; ++i) {\n s[(o = q[i]).i] = o.x(t);\n }\n return s.join('');\n });\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isType_1 = __importDefault(require("./isType")), isArray = value => Array.isArray ? Array.isArray(value) : (0,
|
|
14
|
+
isType_1.default)(value, "Array");
|
|
15
|
+
|
|
16
|
+
exports.default = isArray;
|
|
17
|
+
//# sourceMappingURL=isArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isArray.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B,MAAM,OAAO,GAAG,CAAC,KAAU,EAAuB,EAAE;IAClD,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAM,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC","file":"isArray.js","sourcesContent":["import isType from './isType';\n\nconst isArray = (value: any): value is Array<any> => {\n return Array.isArray ? Array.isArray(value) : isType(value, 'Array');\n};\n\nexport default isArray;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const isArrayLike = function(value) {
|
|
8
|
+
return null !== value && "function" != typeof value && Number.isFinite(value.length);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
exports.default = isArrayLike;
|
|
12
|
+
//# sourceMappingURL=isArrayLike.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isArrayLike.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,UAAU,KAAU;IACtC,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,UAAU,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC","file":"isArrayLike.js","sourcesContent":["const isArrayLike = function (value: any): boolean {\n return value !== null && typeof value !== 'function' && Number.isFinite(value.length);\n};\n\nexport default isArrayLike;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
8
|
+
|
|
9
|
+
exports.default = isBase64;
|
|
10
|
+
//# sourceMappingURL=isBase64.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isBase64.ts"],"names":[],"mappings":";;AAMA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAW,EAAE;IAC1C,MAAM,GAAG,GAAG,+FAA+F,CAAC;IAC5G,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isBase64.js","sourcesContent":["/**\n * 迁移至 sirius\n * Checks if `value` is classified as a `Base64` string;\n * @param {string} The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n */\nconst isBase64 = (value: string): boolean => {\n const exp = /^data:image\\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g;\n const urlPattern = new RegExp(exp);\n return urlPattern.test(value);\n};\n\nexport default isBase64;\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isType_1 = __importDefault(require("./isType")), isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || (0,
|
|
14
|
+
isType_1.default)(value, "Boolean");
|
|
15
|
+
|
|
16
|
+
exports.default = isBoolean;
|
|
17
|
+
//# sourceMappingURL=isBoolean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isBoolean.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAe9B,MAAM,SAAS,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAoB,EAAE;IACzE,IAAI,KAAK,EAAE;QACT,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC;KACnC;IACD,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","file":"isBoolean.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a boolean primitive or object.\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * isBoolean(false)\n * // => true\n *\n * isBoolean(null)\n * // => false\n */\nconst isBoolean = (value: any, fuzzy: boolean = false): value is boolean => {\n if (fuzzy) {\n return typeof value === 'boolean';\n }\n return value === true || value === false || isType(value, 'Boolean');\n};\n\nexport default isBoolean;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isType_1 = __importDefault(require("./isType")), isDate = value => (0, isType_1.default)(value, "Date");
|
|
14
|
+
|
|
15
|
+
exports.default = isDate;
|
|
16
|
+
//# sourceMappingURL=isDate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isDate.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B,MAAM,MAAM,GAAG,CAAC,KAAU,EAAiB,EAAE;IAC3C,OAAO,IAAA,gBAAM,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,kBAAe,MAAM,CAAC","file":"isDate.js","sourcesContent":["import isType from './isType';\n\nconst isDate = (value: any): value is Date => {\n return isType(value, 'Date');\n};\n\nexport default isDate;\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isNil_1 = __importDefault(require("./isNil")), isArrayLike_1 = __importDefault(require("./isArrayLike")), getType_1 = __importDefault(require("./getType")), isPrototype_1 = __importDefault(require("./isPrototype")), hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14
|
+
|
|
15
|
+
function isEmpty(value) {
|
|
16
|
+
if ((0, isNil_1.default)(value)) return !0;
|
|
17
|
+
if ((0, isArrayLike_1.default)(value)) return !value.length;
|
|
18
|
+
const type = (0, getType_1.default)(value);
|
|
19
|
+
if ("Map" === type || "Set" === type) return !value.size;
|
|
20
|
+
if ((0, isPrototype_1.default)(value)) return !Object.keys(value).length;
|
|
21
|
+
for (const key in value) if (hasOwnProperty.call(value, key)) return !1;
|
|
22
|
+
return !0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
exports.default = isEmpty;
|
|
26
|
+
//# sourceMappingURL=isEmpty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isEmpty.ts"],"names":[],"mappings":";;;;;AAAA,oDAA4B;AAC5B,gEAAwC;AACxC,wDAAgC;AAChC,gEAAwC;AAExC,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AAEvD,SAAS,OAAO,CAAC,KAAU;IAUzB,IAAI,IAAA,eAAK,EAAC,KAAK,CAAC,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,IAAA,qBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;KACtB;IAED,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;QACpC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;KACpB;IACD,IAAI,IAAA,qBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;KACnC;IACD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YACnC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,kBAAe,OAAO,CAAC","file":"isEmpty.js","sourcesContent":["import isNil from './isNil';\nimport isArrayLike from './isArrayLike';\nimport getType from './getType';\nimport isPrototype from './isPrototype';\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isEmpty(value: any): boolean {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n // TODO: 这里需要优化下\n const type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (const key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEqual(a: any, b: any): boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
}), exports.isEqual = void 0;
|
|
12
|
+
|
|
13
|
+
const isArray_1 = __importDefault(require("./isArray")), isFunction_1 = __importDefault(require("./isFunction")), isPlainObject_1 = __importDefault(require("./isPlainObject"));
|
|
14
|
+
|
|
15
|
+
function objToString(obj) {
|
|
16
|
+
return Object.prototype.toString.call(obj);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function objectKeys(obj) {
|
|
20
|
+
return Object.keys(obj);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isEqual(a, b) {
|
|
24
|
+
if (a === b) return !0;
|
|
25
|
+
if (typeof a != typeof b) return !1;
|
|
26
|
+
if (null == a || null == b) return !1;
|
|
27
|
+
if (Number.isNaN(a) && Number.isNaN(b)) return !0;
|
|
28
|
+
if (objToString(a) !== objToString(b)) return !1;
|
|
29
|
+
if ((0, isFunction_1.default)(a)) return !1;
|
|
30
|
+
if ("object" != typeof a) return !1;
|
|
31
|
+
if ((0, isArray_1.default)(a)) {
|
|
32
|
+
if (a.length !== b.length) return !1;
|
|
33
|
+
for (let i = a.length - 1; i >= 0; i--) if (!isEqual(a[i], b[i])) return !1;
|
|
34
|
+
return !0;
|
|
35
|
+
}
|
|
36
|
+
if (!(0, isPlainObject_1.default)(a)) return !1;
|
|
37
|
+
const ka = objectKeys(a), kb = objectKeys(b);
|
|
38
|
+
if (ka.length !== kb.length) return !1;
|
|
39
|
+
ka.sort(), kb.sort();
|
|
40
|
+
for (let i = ka.length - 1; i >= 0; i--) if (ka[i] != kb[i]) return !1;
|
|
41
|
+
for (let i = ka.length - 1; i >= 0; i--) {
|
|
42
|
+
const key = ka[i];
|
|
43
|
+
if (!isEqual(a[key], b[key])) return !1;
|
|
44
|
+
}
|
|
45
|
+
return !0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
exports.isEqual = isEqual;
|
|
49
|
+
//# sourceMappingURL=isEqual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isEqual.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,8DAAsC;AACtC,oEAA4C;AAE5C,SAAS,WAAW,CAAC,GAAQ;IAC3B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,UAAU,CAAC,GAAQ;IAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAID,SAAgB,OAAO,CAAC,CAAM,EAAE,CAAM;IACpC,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,CAAC,KAAK,OAAO,CAAC,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC;KACb;IAED,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE;QACrC,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,IAAA,oBAAU,EAAC,CAAC,CAAC,EAAE;QACjB,OAAO,KAAK,CAAC;KACd;IAGD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,IAAA,iBAAO,EAAC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F;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AA5ED,0BA4EC","file":"isEqual.js","sourcesContent":["import isArray from './isArray';\nimport isFunction from './isFunction';\nimport isPlainObject from './isPlainObject';\n\nfunction objToString(obj: any) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction objectKeys(obj: any) {\n return Object.keys(obj);\n}\n\n// Adapted from https://github.com/antvis/F2/blob/master/packages/f2/src/base/equal.ts by zengyue\n// License: https://github.com/antvis/F2/blob/master/packages/f2/LICENSE\nexport function isEqual(a: any, b: any): boolean {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n // null 和 undefined\n if (a == null || b == null) {\n return false;\n }\n\n // 特殊处理NaN\n if (Number.isNaN(a) && Number.isNaN(b)) {\n return true;\n }\n\n if (objToString(a) !== objToString(b)) {\n return false;\n }\n\n // 如果是function,则不相等\n if (isFunction(a)) {\n return false;\n }\n\n // 值类型,Number String Boolean\n if (typeof a !== 'object') {\n return false;\n }\n\n if (isArray(a)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = a.length - 1; i >= 0; i--) {\n if (!isEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n\n if (!isPlainObject(a)) {\n return false;\n }\n\n const ka = objectKeys(a);\n const kb = objectKeys(b);\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) {\n return false;\n }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (let i = ka.length - 1; i >= 0; i--) {\n // eslint-disable-next-line eqeqeq\n if (ka[i] != kb[i]) {\n return false;\n }\n }\n\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (let i = ka.length - 1; i >= 0; i--) {\n const key = ka[i];\n if (!isEqual(a[key], b[key])) {\n return false;\n }\n }\n\n return true;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isFunction.ts"],"names":[],"mappings":";;AA0BA,MAAM,UAAU,GAAG,CAAC,KAAU,EAAqB,EAAE;IACnD,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","file":"isFunction.js","sourcesContent":["/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * isFunction(class Any{})\n * // => true\n *\n * isFunction(() => {})\n * // => true\n *\n * isFunction(async () => {})\n * // => true\n *\n * isFunction(function * Any() {})\n * // => true\n *\n * isFunction(Math.round)\n * // => true\n *\n * isFunction(/abc/)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isFunction = (value: any): value is Function => {\n return typeof value === 'function';\n};\n\nexport default isFunction;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isNil.ts"],"names":[],"mappings":";;AAAA,MAAM,KAAK,GAAG,CAAC,KAAU,EAA6B,EAAE;IACtD,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC","file":"isNil.js","sourcesContent":["const isNil = (value: any): value is null | undefined => {\n return value === null || value === undefined;\n};\n\nexport default isNil;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isNull.ts"],"names":[],"mappings":";;AAAA,MAAM,MAAM,GAAG,CAAC,KAAU,EAAiB,EAAE;IAC3C,OAAO,KAAK,KAAK,IAAI,CAAC;AACxB,CAAC,CAAC;AAEF,kBAAe,MAAM,CAAC","file":"isNull.js","sourcesContent":["const isNull = (value: any): value is null => {\n return value === null;\n};\n\nexport default isNull;\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isType_1 = __importDefault(require("./isType")), isNumber = (value, fuzzy = !1) => {
|
|
14
|
+
const type = typeof value;
|
|
15
|
+
return fuzzy ? "number" === type : "number" === type || (0, isType_1.default)(value, "Number");
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.default = isNumber;
|
|
19
|
+
//# sourceMappingURL=isNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isNumber.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAyB9B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAmB,EAAE;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,KAAK,EAAE;QACT,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC1B;IACD,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isNumber.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `Number.isFinite` method.\n *\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * isNumber(3)\n * // => true\n *\n * isNumber(Number.MIN_VALUE)\n * // => true\n *\n * isNumber(Infinity)\n * // => true\n *\n * isNumber('3')\n * // => false\n */\nconst isNumber = (value: any, fuzzy: boolean = false): value is number => {\n const type = typeof value;\n if (fuzzy) {\n return type === 'number';\n }\n return type === 'number' || isType(value, 'Number');\n};\n\nexport default isNumber;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const isNumeric = value => "string" == typeof value && (!isNaN(Number(value)) && !isNaN(parseFloat(value)));
|
|
8
|
+
|
|
9
|
+
exports.default = isNumeric;
|
|
10
|
+
//# sourceMappingURL=isNumeric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isNumeric.ts"],"names":[],"mappings":";;AAyBA,MAAM,SAAS,GAAG,CAAC,KAAa,EAAW,EAAE;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","file":"isNumeric.js","sourcesContent":["/**\n * Checks if `value` is classified as a legal string number\n *\n * @param {*} value The string value to check.\n * @returns {boolean} Returns `true` if `value` is a legal string number, else `false`.\n * @example\n *\n * isNumeric(1)\n * // => false\n *\n * isNumeric('2.0')\n * // => true\n *\n * isNumeric('3a')\n * // => false\n *\n * isNumeric('4.a')\n * // => false\n *\n * isNumeric(Infinity)\n * // => false\n *\n * isNumeric('01')\n * // => true\n */\nconst isNumeric = (value: string): boolean => {\n if (typeof value !== 'string') {\n return false;\n }\n return !isNaN(Number(value)) && !isNaN(parseFloat(value));\n};\n\nexport default isNumeric;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isObject.ts"],"names":[],"mappings":";;AAsBA,MAAM,QAAQ,GAAG,CAAa,KAAU,EAAc,EAAE;IACtD,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,IAAI,KAAK,UAAU,CAAC;AACtE,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isObject.js","sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * isObject({})\n * // => true\n *\n * isObject([1, 2, 3])\n * // => true\n *\n * isObject(Function)\n * // => true\n *\n * isObject(null)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObject = <T = object>(value: any): value is T => {\n const type = typeof value;\n return (value !== null && type === 'object') || type === 'function';\n};\n\nexport default isObject;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isObjectLike.ts"],"names":[],"mappings":";;AAqBA,MAAM,YAAY,GAAG,CAAC,KAAU,EAA2C,EAAE;IAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC","file":"isObjectLike.js","sourcesContent":["/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * isObjectLike({})\n * // => true\n *\n * isObjectLike([1, 2, 3])\n * // => true\n *\n * isObjectLike(Function)\n * // => false\n *\n * isObjectLike(null)\n * // => false\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isObjectLike = (value: any): value is object | Function | Array<any> => {\n return typeof value === 'object' && value !== null;\n};\n\nexport default isObjectLike;\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isObjectLike_1 = __importDefault(require("./isObjectLike")), isType_1 = __importDefault(require("./isType")), isPlainObject = function(value) {
|
|
14
|
+
if (!(0, isObjectLike_1.default)(value) || !(0, isType_1.default)(value, "Object")) return !1;
|
|
15
|
+
if (null === Object.getPrototypeOf(value)) return !0;
|
|
16
|
+
let proto = value;
|
|
17
|
+
for (;null !== Object.getPrototypeOf(proto); ) proto = Object.getPrototypeOf(proto);
|
|
18
|
+
return Object.getPrototypeOf(value) === proto;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.default = isPlainObject;
|
|
22
|
+
//# sourceMappingURL=isPlainObject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isPlainObject.ts"],"names":[],"mappings":";;;;;AAAA,kEAA0C;AAC1C,sDAA8B;AA4B9B,MAAM,aAAa,GAAG,UAAU,KAAU;IACxC,IAAI,CAAC,IAAA,sBAAY,EAAC,KAAK,CAAC,IAAI,CAAC,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,EAAE;QACpD,OAAO,KAAK,CAAC;KACd;IACD,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,IAAI,KAAK,GAAG,KAAK,CAAC;IAClB,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE;QAC5C,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;KACtC;IACD,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;AAChD,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC","file":"isPlainObject.js","sourcesContent":["import isObjectLike from './isObjectLike';\nimport isType from './isType';\n\n/**\n * @see https://github.com/lodash/lodash/blob/master/isPlainObject.js\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1\n * }\n *\n * isPlainObject(new Foo)\n * // => false\n *\n * isPlainObject([1, 2, 3])\n * // => false\n *\n * isPlainObject({ 'x': 0, 'y': 0 })\n * // => true\n *\n * isPlainObject(Object.create(null))\n * // => true\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst isPlainObject = function (value: any): value is object {\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n let proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\n\nexport default isPlainObject;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const objectProto = Object.prototype, isPrototype = function(value) {
|
|
8
|
+
const Ctor = value && value.constructor;
|
|
9
|
+
return value === ("function" == typeof Ctor && Ctor.prototype || objectProto);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.default = isPrototype;
|
|
13
|
+
//# sourceMappingURL=isPrototype.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isPrototype.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC;AAErC,MAAM,WAAW,GAAG,UAAU,KAAU;IACtC,MAAM,IAAI,GAAG,KAAK,IAAI,KAAK,CAAC,WAAW,CAAC;IACxC,MAAM,KAAK,GAAG,CAAC,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC;IAC5E,OAAO,KAAK,KAAK,KAAK,CAAC;AACzB,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC","file":"isPrototype.js","sourcesContent":["const objectProto = Object.prototype;\n\nconst isPrototype = function (value: any): boolean {\n const Ctor = value && value.constructor;\n const proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;\n return value === proto;\n};\n\nexport default isPrototype;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isType_1 = __importDefault(require("./isType")), isRegExp = value => (0, isType_1.default)(value, "RegExp");
|
|
14
|
+
|
|
15
|
+
exports.default = isRegExp;
|
|
16
|
+
//# sourceMappingURL=isRegExp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isRegExp.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAE9B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAmB,EAAE;IAC/C,OAAO,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isRegExp.js","sourcesContent":["import isType from './isType';\n\nconst isRegExp = (value: any): value is RegExp => {\n return isType(value, 'RegExp');\n};\n\nexport default isRegExp;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isShallowEqual(objA: any, objB: any): boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
}), exports.isShallowEqual = void 0;
|
|
12
|
+
|
|
13
|
+
const isArray_1 = __importDefault(require("./isArray")), isObject_1 = __importDefault(require("./isObject"));
|
|
14
|
+
|
|
15
|
+
function is(x, y) {
|
|
16
|
+
return x === y ? 0 !== x || 0 !== y || 1 / x == 1 / y : x != x && y != y;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function length(obj) {
|
|
20
|
+
return (0, isArray_1.default)(obj) ? obj.length : (0, isObject_1.default)(obj) ? Object.keys(obj).length : 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isShallowEqual(objA, objB) {
|
|
24
|
+
if (is(objA, objB)) return !0;
|
|
25
|
+
if ("object" != typeof objA || null === objA || "object" != typeof objB || null === objB) return !1;
|
|
26
|
+
if ((0, isArray_1.default)(objA) !== (0, isArray_1.default)(objB)) return !1;
|
|
27
|
+
if (length(objA) !== length(objB)) return !1;
|
|
28
|
+
let ret = !0;
|
|
29
|
+
return Object.keys(objA).forEach((k => !!is(objA[k], objB[k]) || (ret = !1, ret))),
|
|
30
|
+
ret;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports.isShallowEqual = isShallowEqual;
|
|
34
|
+
//# sourceMappingURL=isShallowEqual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isShallowEqual.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAChC,0DAAkC;AAElC,SAAS,EAAE,CAAC,CAAM,EAA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CAAC,CAAC,EAAE;YACnB,GAAG,GAAG,KAAK,CAAC;YACZ,OAAO,GAAG,CAAC;SACZ;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACb,CAAC;AA9BD,wCA8BC","file":"isShallowEqual.js","sourcesContent":["import isArray from './isArray';\nimport isObject from './isObject';\n\nfunction is(x: any, y: any) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n }\n // eslint-disable-next-line no-self-compare\n return x !== x && y !== y; // NaN == NaN\n}\n\nfunction length(obj: any) {\n if (isArray(obj)) {\n return obj.length;\n }\n if (isObject(obj)) {\n return Object.keys(obj).length;\n }\n return 0;\n}\n\nexport function isShallowEqual(objA: any, objB: any) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n if (isArray(objA) !== isArray(objB)) {\n return false;\n }\n\n if (length(objA) !== length(objB)) {\n return false;\n }\n\n let ret = true;\n\n Object.keys(objA).forEach((k: any) => {\n const v = objA[k];\n\n if (!is(v, objB[k])) {\n ret = false;\n return ret;\n }\n return true;\n });\n\n return ret;\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __importDefault = this && this.__importDefault || function(mod) {
|
|
4
|
+
return mod && mod.__esModule ? mod : {
|
|
5
|
+
default: mod
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const isType_1 = __importDefault(require("./isType")), isString = (value, fuzzy = !1) => {
|
|
14
|
+
const type = typeof value;
|
|
15
|
+
return fuzzy ? "string" === type : "string" === type || (0, isType_1.default)(value, "String");
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.default = isString;
|
|
19
|
+
//# sourceMappingURL=isString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/isString.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAe9B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,QAAiB,KAAK,EAAmB,EAAE;IACvE,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAC1B,IAAI,KAAK,EAAE;QACT,OAAO,IAAI,KAAK,QAAQ,CAAC;KAC1B;IAED,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAA,gBAAM,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","file":"isString.js","sourcesContent":["import isType from './isType';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * @param {*} value The value to check.\n * @param {boolean} fuzzy Whether to perform fuzzy judgment, for better performance,default to `false`.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * isString('abc')\n * // => true\n *\n * isString(1)\n * // => false\n */\nconst isString = (value: any, fuzzy: boolean = false): value is string => {\n const type = typeof value;\n if (fuzzy) {\n return type === 'string';\n }\n\n return type === 'string' || isType(value, 'String');\n};\n\nexport default isString;\n"]}
|