|
This method is being used outside transactions tests, so it doesn't make sense for it to be in a transactions-specific library:
$ git grep deepCopyObject jstests/
|
jstests/concurrency/fsm_libs/fsm.js:115: data = TransactionsUtil.deepCopyObject({}, args.data);
|
jstests/libs/override_methods/network_error_and_txn_override.js:595: const objCopy = TransactionsUtil.deepCopyObject({}, cmdObj);
|
jstests/libs/transactions_util.js:80: function deepCopyObject(dst, src) {
|
jstests/libs/transactions_util.js:93: v = deepCopyObject({}, v);
|
jstests/libs/transactions_util.js:95: v = deepCopyObject([], v);
|
jstests/libs/transactions_util.js:114: deepCopyObject,
|
Having it in this library also makes it less discoverable.
It would be better to put it in src/mongo/shell/types.js next to extend, which it was originally based on.
|