detect-conflict

WebJar for detect-conflict

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

detect-conflict
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

detect-conflict
WebJar for detect-conflict
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/SBoudrias/detect-conflict

Download detect-conflict

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/detect-conflict/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>detect-conflict</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/detect-conflict/
implementation 'org.webjars.npm:detect-conflict:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/detect-conflict/
implementation ("org.webjars.npm:detect-conflict:1.0.1")
'org.webjars.npm:detect-conflict:jar:1.0.1'
<dependency org="org.webjars.npm" name="detect-conflict" rev="1.0.1">
  <artifact name="detect-conflict" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='detect-conflict', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "detect-conflict" % "1.0.1"
[org.webjars.npm/detect-conflict "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

detect-conflict Build Status

Small utility library that check if a new file content can be merged safely in the on-disk existing file.

Usage

Example

var conflict = require('detect-conflict');

var isConflicting = conflict('some-file-name.js', 'var newContent;');

It'll return true if a conflict is found, false otherwise.

API

conflict(filepath : string, contents : Buffer | String)

If the contents is passed as a string, we assume it is utf8 encoded. Pass a Buffer if you want to compare special encoding.

If filepath points to a directory, we'll always return true.

Versions

Version
1.0.1