1.0.8 • Published 2 years ago

file-visitor v1.0.8

Weekly downloads
17
License
-
Repository
github
Last release
2 years ago

file-visitor

以visitor模式访问数据;

##使用实例

#添加依赖
npm install file-visitor -save 
import fileVisitor from  'file-visitor';

async function  test(){
  let test=  await fileVisitor(dirOrFile,{
    ".*\.[tj]s":async ({content,absPath,name,})=>{
            return 'hello';
    }
  });
 
 let result =await Promise.all(test);
 // ['hello','hello']
}

以正则做为来访问到相应的数据

1.0.8

2 years ago

1.0.6

4 years ago

1.0.1

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago