stream-newline:确保流以换行符结束

时间:2021-06-24 01:51:12
【文件属性】:
文件名称:stream-newline:确保流以换行符结束
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-24 01:51:12
JavaScript 流换行符 确保流以换行符结束 用法 var streamNewline = require ( "stream-newline" ) // A stream that may or may not have a newline at the end var fileStream = fs . createReadStream ( "README.txt" ) // Pipe fileStream to stdout and guarantee a newline at the end fileStream . pipe ( streamNewline ( ) ) . pipe ( process . stdout ) 应用程序接口 流新行([选项]) 创建一个新的流,以确保最后会有一个换行符。 可选的opts参数是一个选项对象,可以包含以下属性: eol :自定义行尾序列。 默认为
【文件预览】:
stream-newline-master
----lib()
--------NewlineStream.js(992B)
----.travis.yml(58B)
----example()
--------has-trailing-newline.txt(44B)
--------catnl.js(324B)
--------no-trailing-newline.txt(38B)
----test()
--------NewlineStreamTest.js(2KB)
----README.md(795B)
----.gitignore(587B)
----index.js(139B)
----package.json(794B)

网友评论