No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

node.js 377B

12345678910111213141516171819
  1. import { readFileSync, statSync, writeFile } from 'fs';
  2. import { format } from 'util';
  3. import { resolve } from 'path';
  4. export default {
  5. fs: {
  6. readFileSync,
  7. writeFile
  8. },
  9. format,
  10. resolve,
  11. exists: (file) => {
  12. try {
  13. return statSync(file).isFile();
  14. }
  15. catch (err) {
  16. return false;
  17. }
  18. }
  19. };