Open tshemsedinov opened 6 months ago
We have multiple places like this where fs.existsSyns can be easily be changed to async await syntax
fs.existsSyns
https://github.com/diia-open-source/be-pkg-db/blob/0ac6f89eb7d1a961ced739c033862527caece65f/src/services/database.ts#L165
Consider:
const toBool = [() => true, () => false]; const exists = await fs.promises.access(filePath).then(...toBool);
https://github.com/diia-open-source/be-pkg-db/pull/3
We have multiple places like this where
fs.existsSyns
can be easily be changed to async await syntaxhttps://github.com/diia-open-source/be-pkg-db/blob/0ac6f89eb7d1a961ced739c033862527caece65f/src/services/database.ts#L165
Consider: