npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@gh-conf/gh-conf-response

1.0.2 • Public • Published

gh-conf-response

Response builder for gh-conf liraries

Build Status Github Repo Size Contributors Commit

It reads the github config file and returns it contents. It needs respository path as input to read the config.

Give us a ⭐️ if you like our work ❤️

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

install

npm i @gh-conf/gh-conf-response

Downloadsweekly downloads

22

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability