{"_id":"detect-conflict","_rev":"79128","name":"detect-conflict","description":"Small utility library that check if a new file content can be merged safely in the on-disk existing file.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"sboudrias","email":""}],"time":{"modified":"2021-06-03T10:25:21.000Z","created":"2014-11-02T02:04:19.444Z","1.0.1":"2016-07-04T22:22:03.727Z","1.0.0":"2014-11-02T02:04:19.444Z"},"users":{"zckrs":true,"itonyyo":true},"author":{"name":"Simon Boudrias"},"repository":{"type":"git","url":"git+https://github.com/SBoudrias/detect-conflict.git"},"versions":{"1.0.1":{"name":"detect-conflict","version":"1.0.1","description":"Small utility library that check if a new file content can be merged safely in the on-disk existing file.","main":"index.js","files":["index.js"],"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/SBoudrias/detect-conflict.git"},"author":{"name":"Simon Boudrias"},"license":"MIT","bugs":{"url":"https://github.com/SBoudrias/detect-conflict/issues"},"homepage":"https://github.com/SBoudrias/detect-conflict","dependencies":{},"devDependencies":{"mocha":"^1.21.5"},"gitHead":"e76dace2df7c0950f2b32ee9bddddc98200d61ba","_id":"detect-conflict@1.0.1","_shasum":"088657a66a961c05019db7c4230883b1c6b4176e","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"dist":{"shasum":"088657a66a961c05019db7c4230883b1c6b4176e","size":1019,"noattachment":false,"key":"/detect-conflict/-/detect-conflict-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/detect-conflict/download/detect-conflict-1.0.1.tgz"},"maintainers":[{"name":"sboudrias","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/detect-conflict-1.0.1.tgz_1467670923112_0.9460013275966048"},"directories":{},"publish_time":1467670923727,"_cnpm_publish_time":1467670923727,"_hasShrinkwrap":false},"1.0.0":{"name":"detect-conflict","version":"1.0.0","description":"Small utility library that check if a new file content can be merged safely in the on-disk existing file.","main":"index.js","files":["index.js"],"scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/SBoudrias/detect-conflict"},"author":{"name":"Simon Boudrias"},"license":"MIT","bugs":{"url":"https://github.com/SBoudrias/detect-conflict/issues"},"homepage":"https://github.com/SBoudrias/detect-conflict","dependencies":{},"devDependencies":{"mocha":"^1.21.5"},"gitHead":"bf0016eca3c94fdc3772136e4c0f307242b5714a","_id":"detect-conflict@1.0.0","_shasum":"eaa13c2554aa015f4b471174ab7925065e9d9a02","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"maintainers":[{"name":"sboudrias","email":""}],"dist":{"shasum":"eaa13c2554aa015f4b471174ab7925065e9d9a02","size":1237,"noattachment":false,"key":"/detect-conflict/-/detect-conflict-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/detect-conflict/download/detect-conflict-1.0.0.tgz"},"directories":{},"publish_time":1414893859444,"_cnpm_publish_time":1414893859444,"_hasShrinkwrap":false}},"readme":"detect-conflict [![Build Status](https://travis-ci.org/SBoudrias/detect-conflict.svg?branch=master)](https://travis-ci.org/SBoudrias/detect-conflict)\n=================\n\nSmall utility library that check if a new file content can be merged safely in the on-disk existing file.\n\n## Usage\n\n### Example\n```js\nvar conflict = require('detect-conflict');\n\nvar isConflicting = conflict('some-file-name.js', 'var newContent;');\n```\n\nIt'll return `true` if a conflict is found, `false` otherwise.\n\n### API\n\n#### `conflict(filepath : string, contents : Buffer | String)`\n\nIf the `contents` is passed as a string, we assume it is utf8 encoded. Pass a `Buffer` if you want to compare special encoding.\n\nIf `filepath` points to a directory, we'll always return `true`.\n","_attachments":{},"homepage":"https://github.com/SBoudrias/detect-conflict","bugs":{"url":"https://github.com/SBoudrias/detect-conflict/issues"},"license":"MIT"}