1.1.0 • Published 8 years ago

compare-with-file v1.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

compare-with-file

Build Status v1.1.0

Compare the contents of a file with a string.

import { fileMatches } from 'compare-with-file';

fileMatches(filePath, 'expected contents'); // returns Boolean

To view a diff when the files don't match, use setLogging.

import { fileMatches, setLogging } from 'compare-with-file';
setLogging(true);

example output

- expected
+ actual

-   Th   is is the input file.\n
  "+-|+++-|---------------------"
+  w hoop s
1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago