add-final-newline

A convenient library for adding newline to a file. - It can be used via command-line, and library. - It was inspired by https://github.com/sindresorhus/strip-final-newline.

Usage no npm install needed!

<script type="module">
  import addFinalNewline from 'https://cdn.skypack.dev/add-final-newline';
</script>

README

CI

add-final-newline

How to use

yarn add add-final-newline
yarn afl anyfile

or

const afl = require("add-final-newline");
const withNewline = afl("...");