0.0.2 • Published 1 year ago

file2lines v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

axios-elasticsearch npm version

convert a file (autodetect encoding) to an array of lines/paras

Installation

npm i file2lines

Usage

import file2lines from "file2lines";

const lines = file2line("./filename")  // remove blank lines

const lines = file2line("./filename", false)  // retain blank lines

// will throw exception if unable to detect file encoding