aboutsummaryrefslogtreecommitdiff
path: root/node_modules/y18n/build/lib/platform-shims/node.js
blob: 181208b81fcaa9d6916aed072abc7ff580781d6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { readFileSync, statSync, writeFile } from 'fs';
import { format } from 'util';
import { resolve } from 'path';
export default {
    fs: {
        readFileSync,
        writeFile
    },
    format,
    resolve,
    exists: (file) => {
        try {
            return statSync(file).isFile();
        }
        catch (err) {
            return false;
        }
    }
};