1.0.1 • Published 9 years ago
loc-down v1.0.1
loc-down

check number lines of code changed
Installation
$ npm install --save loc-downUsage
var locDown = require('loc-down');
locDown('git@github.com:tteltrab/loc-down.git', 'master', 200)
.then(isReasonable => {
// isReasonable is a boolean - true if <= 200 lines changed, false otherwise
})
.catch(error => {
// error is whatever issue was encountered when trying to diff with the provided parameters
});locDown(repo, branch, loc)
Determine if loc difference from repo/branch is less than or equal to loc.
repo{String}url representation for the repo against which diffs will be donebranch{String}name of the branch to diff againstloc{Number}number which indicates the maximum lines of code which should be changed
Returns a promise:
.then(isReasonable => {})- promise is resolved if the diff was successful, with the booleanisReasonablebeing true/false if the loc difference is lte/gt thelocparameter respectively.catch(error => {})- promise is rejected if some error was encountered when attempting to diff agianstrepo/branch
License
MIT © Nick Bartlett