import lockfile from 'proper-lockfile';
import { FileType, type Statistics } from '../../types';
-import { FileUtils, Utils } from '../../utils';
+import { Constants, FileUtils, Utils } from '../../utils';
import { Storage } from '../internal';
export class JsonFileStorage extends Storage {
}
await release();
})
- .catch(() => {
- /* This is intentional */
- });
+ .catch(Constants.EMPTY_FUNCTION);
}
public open(): void {
try {
- if (this?.fd === undefined || this?.fd === null) {
+ if (Utils.isNullOrUndefined(this?.fd)) {
this.fd = fs.openSync(this.dbName, 'a+');
}
} catch (error) {