Skip to content

ffreemt/file2lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file2lines mocha License: MIT 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

About

convert a file to array of lines/paras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages