diff options
Diffstat (limited to 'node_modules/y18n/build/lib/platform-shims/node.js')
-rw-r--r-- | node_modules/y18n/build/lib/platform-shims/node.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/node_modules/y18n/build/lib/platform-shims/node.js b/node_modules/y18n/build/lib/platform-shims/node.js new file mode 100644 index 0000000..181208b --- /dev/null +++ b/node_modules/y18n/build/lib/platform-shims/node.js @@ -0,0 +1,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; + } + } +}; |