05 2024 档案

nodeJS文件操作
摘要:const { log } = require("console"); const fs = require("fs"); const path = require("path"); const filename = path.resolve(__dirname, "./myfiles1.txt") 阅读全文

posted @ 2024-05-23 23:03 龍瀧尨呀 阅读(4) 评论(0) 推荐(0) 编辑

nodeJS 内置对象
摘要:// const { log } = require("console"); // const { argv } = require("process"); // log(__dirname) // setImmediate(()=>{ // log(__filename) // }) // con 阅读全文

posted @ 2024-05-23 19:50 龍瀧尨呀 阅读(5) 评论(0) 推荐(0) 编辑

关于模块和require,module,exports,module.exports的关系
摘要:require函数的伪代码: const result = require('.myModule') function require(modulePath) { // 1.modulePath转为绝对路径 // 2.判断是否该模块已有缓存 如果有则返回缓存 // 3.读取文件内容 // 4.包裹到 阅读全文

posted @ 2024-05-23 16:30 龍瀧尨呀 阅读(9) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示