New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

file-visitor

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-visitor

file-visitor

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

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']
}

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

Keywords

quick

FAQs

Package last updated on 03 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts