todofinder:在目录中搜索关键字“ TODO”

时间:2021-03-05 07:37:02
【文件属性】:
文件名称:todofinder:在目录中搜索关键字“ TODO”
文件大小:36KB
文件格式:ZIP
更新时间:2021-03-05 07:37:02
JavaScript todofinder.js 在文件夹(包括所有子文件夹)中的所有文件中搜索字符串“ TODO” todofinder.js将梳理关键字“ TODO”的所有实例的指定目录(或当前工作目录,如果未指定目标目录) 应该适用于大多数版本的NodeJS(已确认可与最新的稳定版本14.16.0一起使用) 通过命令行使用 通过命令行使用是通过app.js node app.js 可以传递参数来指定要搜索的目录 node app.js ./test 在您自己的代码中的用法 使用以下命令将todofinder导入代码中 const todofinder = require('./todofinder.js') 然后可以正常运行 let path = './test' let todoList = todofinder(path) console.log(todoList) 测试 通过摩卡&柴完成
【文件预览】:
todofinder-main
----.gitignore(24B)
----app.js(396B)
----todofinder.js(2KB)
----package.json(391B)
----package-lock.json(62KB)
----README.md(1KB)
----example.js(121B)
----test()
--------testcase1-find12across5files()
--------todofinderTest.js(963B)
--------testcase4-find9across4files()
--------testcase2-no match()

网友评论