0.2.0 • Published 7 years ago

liny v0.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

Liny

使用自定义过滤器,对文本按行进行处理的工具,支持自动编码转换成 UTF-8 输出。

Install

npm i -g liny

Usage

demo

echo 'line1\nline2' | liny filter-demo

Custom filter

新建自定义过滤器: ./my-filter.js

module.exports = function (line) {
    if (/^[0-9]+,/.test(line)) {
        console.log(line);
    }
}
liny ./my-filter  < in.csv > out.csv