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.esm.js
CHANGED
|
@@ -14617,6 +14617,53 @@ const FormulaUtils = {
|
|
|
14617
14617
|
allCellVals = [funDefaultVal];
|
|
14618
14618
|
}
|
|
14619
14619
|
}
|
|
14620
|
+
/**
|
|
14621
|
+
* 综合判断是否为纯JSON对象
|
|
14622
|
+
* @param {any} obj - 要判断的变量
|
|
14623
|
+
* @returns {boolean}
|
|
14624
|
+
*/
|
|
14625
|
+
function isPlainObject(obj) {
|
|
14626
|
+
// 基本类型检查
|
|
14627
|
+
if (obj === null || typeof obj !== 'object') {
|
|
14628
|
+
return false;
|
|
14629
|
+
}
|
|
14630
|
+
// 原型检查
|
|
14631
|
+
const proto = Object.getPrototypeOf(obj);
|
|
14632
|
+
if (proto !== null && proto !== Object.prototype) {
|
|
14633
|
+
return false;
|
|
14634
|
+
}
|
|
14635
|
+
// 构造函数检查
|
|
14636
|
+
if (obj.constructor !== Object) {
|
|
14637
|
+
return false;
|
|
14638
|
+
}
|
|
14639
|
+
return true;
|
|
14640
|
+
}
|
|
14641
|
+
// 处理技术要求对象的值
|
|
14642
|
+
if (allCellVals != null && allCellVals != undefined && allCellVals.length > 0) {
|
|
14643
|
+
for (var i = 0; i < allCellVals.length; i++) {
|
|
14644
|
+
let item = allCellVals[i];
|
|
14645
|
+
if (item != null && item != undefined && isPlainObject(item) && item.hasOwnProperty('con') && item.hasOwnProperty('val')) {
|
|
14646
|
+
allCellVals[i] = item['val'];
|
|
14647
|
+
}
|
|
14648
|
+
}
|
|
14649
|
+
}
|
|
14650
|
+
if (allCellValsEw != null && allCellValsEw != undefined && allCellValsEw.length > 0) {
|
|
14651
|
+
for (var i = 0; i < allCellValsEw.length; i++) {
|
|
14652
|
+
let item = allCellValsEw[i];
|
|
14653
|
+
if (item != null && item != undefined && item.length > 0) {
|
|
14654
|
+
for (var j = 0; j < item.length; i++) {
|
|
14655
|
+
let element = item[j];
|
|
14656
|
+
if (element != null &&
|
|
14657
|
+
element != undefined &&
|
|
14658
|
+
isPlainObject(element) &&
|
|
14659
|
+
element.hasOwnProperty('con') &&
|
|
14660
|
+
element.hasOwnProperty('val')) {
|
|
14661
|
+
item[j] = element['val'];
|
|
14662
|
+
}
|
|
14663
|
+
}
|
|
14664
|
+
}
|
|
14665
|
+
}
|
|
14666
|
+
}
|
|
14620
14667
|
//返回的回调函数参数数据
|
|
14621
14668
|
let retData = {
|
|
14622
14669
|
arguments: arguments,
|