@gh-conf/gh-conf-response

gh-conf response builder

Usage no npm install needed!

<script type="module">
  import ghConfGhConfResponse from 'https://cdn.skypack.dev/@gh-conf/gh-conf-response';
</script>

README

gh-conf-response

Build Status Github Repo Size LICENSE NPM Downloads NPM Version Contributors Commit

Response builder for gh-conf libraries

Give us a :star: if you like our work :heart:

Buy Me A Coffee Become a Patron!

Please consider donating, if you like my work

Install

$ npm install @gh-conf/gh-conf-response

Usage

const { formatError, formatSuccess } = require('@gh-conf/gh-conf-response');

const successResponse = formatSuccess('Successfully passed', { name: 'formatSuccess' });
console.log(successResponse)
// Output
/**
 * {
 *  status: 'success',
 *  message: 'Successfully passed',
 *  data: {
 *    name: 'formatSuccess'
 *  }
 * }
 **/


const errorResposne = formatError('Error running tests', { err: '101' });
console.log(successResponse)
// Output
/**
 * {
 *  status: 'err',
 *  message: 'Error running tests',
 *  data: {
 *    err: '101'
 *  }
 * }
 **/


Contributing

Interested in contributing to this project? You can log any issues or suggestion related to this library here

Read our contributing guide on getting started with contributing to the codebase

Contributors

Thank you to all the contributors who have helped us in making this project better 🙌