1.0.0 • Published 6 years ago

detect-trailing-whitespace v1.0.0

Weekly downloads
7
License
BSD-2-Clause
Repository
github
Last release
6 years ago

detect-trailing-whitespace

npm Linux Build Status Windows Build Status

Detect trailing whitespace

Installation

$ npm install detect-trailing-whitespace

Usage

const fs = require('fs');
const detectTrailingWhitespace = require('detect-trailing-whitespace');

const fileContents = fs.readFileSync('file.txt', 'utf8');
const containsTrailingWhitespace = detectTrailingWhitespace(fileContents);

console.log(containsTrailingWhitespace);
// => `true` if file contains trailing whitespace, otherwise `false`

Changelog

This project follows Semantic Versioning 2.

  • v1.0.0 (2017-07-23):
    • Add support for Node.js v6, v8, and v10.
    • Drop support for Node.js versions older than v6.
  • v0.1.0 (2015-01-24): Initial release.