# detect-conflicts

> Check for conflicts, and get prompted for action (when needed), before writing a file to disk.

Latest version **0.1.1** (published 2015-08-19) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install detect-conflicts
pnpm add detect-conflicts
yarn add detect-conflicts
bun add detect-conflicts
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-08-19 |
| First published | 2015-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 13 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | check, compare, comparison, conflict, conflicts, content, contents, detect, diff, file, filepath, string, verify |

## Links

- npm: https://www.npmjs.com/package/detect-conflicts
- Repository: https://github.com/jonschlinkert/detect-conflicts
- Issues: https://github.com/jonschlinkert/detect-conflicts/issues
- npm.io page: https://npm.io/package/detect-conflicts

## Dependencies (13)

- [diff](https://npm.io/package/diff.md) ^2.0.2
- [ansi-red](https://npm.io/package/ansi-red.md) ^0.1.1
- [inquirer](https://npm.io/package/inquirer.md) ^0.9.0
- [ansi-bold](https://npm.io/package/ansi-bold.md) ^0.1.1
- [ansi-cyan](https://npm.io/package/ansi-cyan.md) ^0.1.1
- [ansi-gray](https://npm.io/package/ansi-gray.md) ^0.1.1
- [is-binary](https://npm.io/package/is-binary.md) ^0.1.0
- [ansi-green](https://npm.io/package/ansi-green.md) ^0.1.1
- [lazy-cache](https://npm.io/package/lazy-cache.md) ^0.2.2
- [ansi-yellow](https://npm.io/package/ansi-yellow.md) ^0.1.1
- [error-symbol](https://npm.io/package/error-symbol.md) ^0.1.0
- [success-symbol](https://npm.io/package/success-symbol.md) ^0.1.0
- [warning-symbol](https://npm.io/package/warning-symbol.md) ^0.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-08-19
- 0.1.0 — 2015-08-07

## README

# detect-conflicts [![NPM version](https://badge.fury.io/js/detect-conflicts.svg)](http://badge.fury.io/js/detect-conflicts)

> Check for conflicts, and get prompted for action (when needed), before writing a file to disk.

Some of this code is based on the [conflicter in yeoman-generator](https://github.com/yeoman/generator) and the [visual diff method in verb](https://github.com/verbose/verb).

## Install

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i detect-conflicts --save
```

## Usage

```js
var detect = require('detect-conflicts');

var file = {path: 'fixtures/a.txt', contents: 'aaa'};
detect(file, function (res) {
  // `res` would be a user response. we'll only get to this
  // point if the user chooses not to abort. 
});
```

## Related projects

* [assemble](http://assemble.io): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… [more](http://assemble.io)
* [snippet](https://github.com/jonschlinkert/snippet): CLI and API for easily creating, reusing, sharing and generating snippets of code from the… [more](https://github.com/jonschlinkert/snippet)
* [template](https://github.com/jonschlinkert/template): Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… [more](https://github.com/jonschlinkert/template)
* [yeoman-generator](http://yeoman.io): Rails-inspired generator system that provides scaffolding for your apps

## Running tests

Install dev dependencies:

```sh
$ npm i -d && npm test
```

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/detect-conflicts/issues/new)

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2015 Jon Schlinkert
[BSD license](http://opensource.org/licenses/bsd-license.php)
Copyright (c) Google
Released under the MIT license.

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._

---
_Source: https://npm.io/package/detect-conflicts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
