New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

compare-directories

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compare-directories

Assertion to compare two directories.

0.1.0
latest
Source
npm
Version published
Weekly downloads
146
7.35%
Maintainers
1
Weekly downloads
 
Created
Source

compare-directories

AppVeyor Travis CI

A simple function for to assert two directories.

Function access everything using asynchronous APIs to make sure it's efficient.

I just needed it for some project, and it made sense to extract it into a separate package. But it wasn't tested in any other project than mine, due to time constraints. This is why lib might not necessairly suit other use cases. If you fill you're up for the task, feel free to drop pull request. Any PRs are welcome.

Installation

$ npm install --save-dev compare-directories

Usage

const compareDirectories = require( 'compare-directories' );

it( 'passes with identical dirs', () => {
	const input = path.join( __dirname, '_fixtures', 'same', 'input' ),
		output = path.join( __dirname, '_fixtures', 'same', 'output' );

	// Note that compareDirectories return Promise.
	return compareDirectories( output, input, {
		diff: true,
		skipEol: true
	} );
} );

Options

compareDirectories function takes few options:

  • skipEol - Boolean - Whether different End-of-Line markers should be ignored. Defaults to true.
  • diff - Boolean - Whether diff should be displayed if assertion fails. Defaults to false.

License

MIT © Marek Lewandowski

FAQs

Package last updated on 12 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts