duqu
v1.0.6
Published
```javascript const fs=require("fs"); const http=require("http"); const url=require("url"); const path=require("path"); const { rejects } = require("assert"); function readFile(pathfile){ return new Promise((resolve,reject)=>{ fs.rea
Downloads
1
Readme
const fs=require("fs");
const http=require("http");
const url=require("url");
const path=require("path");
const { rejects } = require("assert");
function readFile(pathfile){
return new Promise((resolve,reject)=>{
fs.readFile(pathfile,"utf-8",(err,data)=>{
if(err){
reject(err);
return
}
resolve(data);
})
})
}
readFile("index.js").then(result=>{
console.log(result);
}).catch(err=>{
console.log(err);
});