/read-first-line

Read first line of the file

Primary LanguageTypeScript

Read-first-line

Read first line of the file. Works fine with LF and CRLF line endings.

Install

npm install read-first-line

Usage

const readFirstLine = require("read-first-line");

readFirstLine("./file.txt").then((result) => {
  console.log("first line is: " + result);
});