Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

yz-dome

yzajt4ISC1.0.0

`js const fs = require('fs'); class ReadFile{ constructor (options){ Object.assign(this,{},options); const inof = fs.statSync(this.pathDir); if(inof.isFile()){ const a = fs.readFileSync(this.pathDir,'utf-8'

readme

杨招小dome

const fs = require('fs');
class ReadFile{
    constructor (options){
        Object.assign(this,{},options);
        const inof = fs.statSync(this.pathDir);
        if(inof.isFile()){
            const a = fs.readFileSync(this.pathDir,'utf-8');
            console.log(a);
        }else{
            const arr = fs.readdirSync(this.pathDir);
            arr.forEach(item=>{
                item = this.pathDir + "/" + item;
                const a = fs.readFileSync(item,'utf-8');
                console.log(a);
            })
        }
    }
}
new ReadFile({
    pathDir:'dome01'
})