text-base-lookup
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

text-base-lookup

遍历目录获取所有文本类型(或二进制)文件

安装

  npm install text-base-lookup --save

使用

import lookup from "text-base-lookup";

const resolve = (...relativePath) => path.resolve(__dirname, '../', ...relativePath);

const patterns = [
  resolve('app/**/*')
];

lookup(patterns).then(({ text, binary }) => {
  console.log(text); // 文本类型文件列表
  console.log(binary); // 二进制文件列表
});

作者

She Ailun

Readme

Keywords

Package Sidebar

Install

npm i text-base-lookup

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

9.3 kB

Total Files

15

Last publish

Collaborators

  • jf3096