alan
/
sfs
1
Fork 0

convert to ESM

This commit is contained in:
Alan Faubert 2021-06-06 11:42:55 -04:00
parent 8efcd4686b
commit b4374eaafc
2 changed files with 6 additions and 7 deletions

View File

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

12
sfs.js
View File

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