rapid-spreadjs 1.0.116 → 1.0.118
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/dist/index.cjs.js +47 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +47 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14639,6 +14639,53 @@ const FormulaUtils = {
|
|
|
14639
14639
|
allCellVals = [funDefaultVal];
|
|
14640
14640
|
}
|
|
14641
14641
|
}
|
|
14642
|
+
/**
|
|
14643
|
+
* 综合判断是否为纯JSON对象
|
|
14644
|
+
* @param {any} obj - 要判断的变量
|
|
14645
|
+
* @returns {boolean}
|
|
14646
|
+
*/
|
|
14647
|
+
function isPlainObject(obj) {
|
|
14648
|
+
// 基本类型检查
|
|
14649
|
+
if (obj === null || typeof obj !== 'object') {
|
|
14650
|
+
return false;
|
|
14651
|
+
}
|
|
14652
|
+
// 原型检查
|
|
14653
|
+
const proto = Object.getPrototypeOf(obj);
|
|
14654
|
+
if (proto !== null && proto !== Object.prototype) {
|
|
14655
|
+
return false;
|
|
14656
|
+
}
|
|
14657
|
+
// 构造函数检查
|
|
14658
|
+
if (obj.constructor !== Object) {
|
|
14659
|
+
return false;
|
|
14660
|
+
}
|
|
14661
|
+
return true;
|
|
14662
|
+
}
|
|
14663
|
+
// 处理技术要求对象的值
|
|
14664
|
+
if (allCellVals != null && allCellVals != undefined && allCellVals.length > 0) {
|
|
14665
|
+
for (var i = 0; i < allCellVals.length; i++) {
|
|
14666
|
+
let item = allCellVals[i];
|
|
14667
|
+
if (item != null && item != undefined && isPlainObject(item) && item.hasOwnProperty('con') && item.hasOwnProperty('val')) {
|
|
14668
|
+
allCellVals[i] = item['val'];
|
|
14669
|
+
}
|
|
14670
|
+
}
|
|
14671
|
+
}
|
|
14672
|
+
if (allCellValsEw != null && allCellValsEw != undefined && allCellValsEw.length > 0) {
|
|
14673
|
+
for (var i = 0; i < allCellValsEw.length; i++) {
|
|
14674
|
+
let item = allCellValsEw[i];
|
|
14675
|
+
if (item != null && item != undefined && item.length > 0) {
|
|
14676
|
+
for (var j = 0; j < item.length; i++) {
|
|
14677
|
+
let element = item[j];
|
|
14678
|
+
if (element != null &&
|
|
14679
|
+
element != undefined &&
|
|
14680
|
+
isPlainObject(element) &&
|
|
14681
|
+
element.hasOwnProperty('con') &&
|
|
14682
|
+
element.hasOwnProperty('val')) {
|
|
14683
|
+
item[j] = element['val'];
|
|
14684
|
+
}
|
|
14685
|
+
}
|
|
14686
|
+
}
|
|
14687
|
+
}
|
|
14688
|
+
}
|
|
14642
14689
|
//返回的回调函数参数数据
|
|
14643
14690
|
let retData = {
|
|
14644
14691
|
arguments: arguments,
|