utiller 1.0.371 → 1.0.373
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/lib/utiller/index.js
CHANGED
|
@@ -623,6 +623,11 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
623
623
|
return referenceObj ? _lodash["default"].merge({}, currentObj, referenceObj) : currentObj;
|
|
624
624
|
});
|
|
625
625
|
});
|
|
626
|
+
/**
|
|
627
|
+
* 檢查多個鍵 (authorId 和 teamId)
|
|
628
|
+
* const result2 = areAllValuesTheSameOnKeys(items, 'authorId', 'teamId');
|
|
629
|
+
* console.log(`檢查 authorId 和 teamId: ${result2}`); // 輸出: true (A, T1 都相同)
|
|
630
|
+
*/
|
|
626
631
|
(0, _defineProperty2["default"])(this, "areAllValuesTheSameOnKeys", function (array) {
|
|
627
632
|
for (var _len4 = arguments.length, keys = new Array(_len4 > 1 ? _len4 - 1 : 0), _key5 = 1; _key5 < _len4; _key5++) {
|
|
628
633
|
keys[_key5 - 1] = arguments[_key5];
|
|
@@ -657,6 +662,9 @@ var Utiller = /*#__PURE__*/function () {
|
|
|
657
662
|
_ret = _loop();
|
|
658
663
|
if (_ret) return _ret.v;
|
|
659
664
|
}
|
|
665
|
+
|
|
666
|
+
// 如果所有鍵都通過了檢查,則返回 true
|
|
667
|
+
return true;
|
|
660
668
|
});
|
|
661
669
|
this.init();
|
|
662
670
|
this.env = "dev";
|
package/package.json
CHANGED