# yyq-read

> ```js const fs=require('fs'); class ReadFile{ constructor(options){ Object.assign(this,{},options); const info=fs.statSync(this.pathfile); if(info.isFile()){ const a=fs.readFileSync(this.pathfile,"u

Latest version **1.0.0** (published 2020-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install yyq-read
pnpm add yyq-read
yarn add yyq-read
bun add yyq-read
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-11-18 |
| First published | 2020-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yuyaqian |

## Links

- npm: https://www.npmjs.com/package/yyq-read
- npm.io page: https://npm.io/package/yyq-read

## Recent versions

- 1.0.0 (latest) — 2020-11-18

## README

#面向对象封装读取
```js
const fs=require('fs');
class ReadFile{
      constructor(options){
          Object.assign(this,{},options);
          const info=fs.statSync(this.pathfile);
          if(info.isFile()){
              const a=fs.readFileSync(this.pathfile,"utf-8");
              console.log(a);
              
          }else{
              const arr=fs.readdirSync(this.pathfile);
              arr.forEach(item=>{
                  item=this.pathfile+"/"+item;
                  const b=fs.readFileSync(item,"utf-8");
                  console.log(b);  
              })
          }
      }
}
new ReadFile({
    pathfile:"1.txt"
})
```

---
_Source: https://npm.io/package/yyq-read · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
