Open yrambler2001 opened 4 months ago
it is common in diia repositories to use isObject from lodash
https://github.com/diia-open-source/be-diia-logger/blob/c26c7ce94c594a009c6bd99ec660304f996d248e/src/index.ts#L4
https://github.com/diia-open-source/be-diia-logger/blob/c26c7ce94c594a009c6bd99ec660304f996d248e/src/index.ts#L42
Array.isArray
https://github.com/diia-open-source/be-diia-logger/blob/c26c7ce94c594a009c6bd99ec660304f996d248e/src/trimmer.ts#L32
and Buffer.isBuffer
https://github.com/diia-open-source/be-diia-logger/blob/c26c7ce94c594a009c6bd99ec660304f996d248e/src/trimmer.ts#L28
Please add permalinks to code like in this issue: https://github.com/diia-open-source/be-user-service/issues/92 or at least urls to certain files
Array.isArray exists more than 10 years.
There is no need to use
value && typeof value === 'object' && value.constructor === Array