【文件属性】:
文件名称:each-file:循环文件缓冲区或流
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-01 09:23:27
JavaScript
每个文件
循环文件缓冲区或流。
例子
var eachFile = require ( "each-file" ) ;
eachFile ( '*.js' , function withFile ( file , cb ) {
file . path // The file path
file . base // Base path based on glob
file . relative // Relative file path from base
file . contents // The file contents
cb ( null ) ;
} , function onDone ( ) {
// completed iterating
} ) ;
安装
npm install each-file
测试
npm test
NPM 脚本
npm
【文件预览】:
each-file-master
----.travis.yml(97B)
----LICENSE(1KB)
----test()
--------fixtures()
--------index.js(2KB)
----README.md(1KB)
----.lintignore(14B)
----.editorconfig(276B)
----.gitignore(30B)
----index.js(963B)
----CHANGELOG.md(86B)
----package.json(2KB)