2.0.0 • Published 8 years ago
kutil v2.0.0
kutil
Utility tool to debug and log values passed into it.
const util = require('kutil');
- Must start project with
DEBUG=true node src/your-entry-point
Debug Usage
The debug functionality can be accessed by running util.debug(title, data, status, logtype)
which will log according to the log type. The params work as follows:
title: is the Title of the log.
data: any type of data type passed in. It can also be an error return from a function.
status: an informational segment provided by the developer to keep track of the debug.
logtype: this determines whether the output will be through
console.log, console.warn, or console.error
.Example Usage: util.debug('Test Title', { apple: 'pie' }, 'Description Status', 'log');
Output:
Thu, 06/23rd/16, 10:55:45pm: Test Title: Description Status ============================================== {"apple":"pie"}
### Version Bump
In order to use the Version Bump feature simply follow this format `util.bump(version_number, label)`. Where the params are as follows:
* version_number: is going to be the version number that you want to bump. It should follow the [Semantic Versioning](http://semver.org/) rules.
* label: it specifies the type of bump to be made. It can be either MAJOR, MINOR or PATCH, if anything else is passed in it will return an error string. The label can be either lower or upper case.
Example Use: util.bump('1.2.3', 'minor');
Output: '1.3.0'