MCPcopy
hub / github.com/mongodb/node-mongodb-native / friendlyDate

Function friendlyDate

etc/crawfish.mjs:115–122  ·  etc/crawfish.mjs::friendlyDate
(log)

Source from the content-addressed store, hash-verified

113}
114
115function friendlyDate(log) {
116 const dateString = typeof log.t === class="st">'string' ? log.t : log.t.$date;
117 try {
118 log.t = new Date(Date.parse(dateString)).toISOString();
119 } catch (e) {
120 if (warnings) console.error(`Cannot translate date time of ${JSON.stringify(log)}`);
121 }
122}
123
124function collectTests(xuint, testFilter) {
125 const suites = xuint.testsuites.testsuite;

Callers 1

mainFunction · 0.85

Calls 2

errorMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected