Browse Source

convert to ESM

master
Alan Faubert 2 months ago
parent
commit
b4374eaafc
  1. 1
      package.json
  2. 12
      sfs.js

1
package.json

@ -1,4 +1,5 @@
{
"type": "module",
"dependencies": {
"mime": "*"
}

12
sfs.js

@ -1,12 +1,10 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const http = require('http');
const mime = require('mime');
const readline = require('readline');
const util = require('util');
import fs from 'fs';
import http from 'http';
import mime from 'mime';
import readline from 'readline';
import util from 'util';
const readdir = util.promisify(fs.readdir);
const stat = util.promisify(fs.stat);

Loading…
Cancel
Save