dmboutput

Flexible output handling for easy API developing with node + express.

Usage no npm install needed!

<script type="module">
  import dmboutput from 'https://cdn.skypack.dev/dmboutput';
</script>

README

dmboutput

Flexible output handling for easy API developing with node + express.

Install

npm i dmboutput -s

Import

const out = require('dmboutput');

Functions overview

output

Easy output of what you could want as json API. Don't worry it's string, object, redirection or even an error object. The function will find the best way to output to client.

error

Handle errors and exceptions and output them easy. Full ready for working with output function, so you can aggregate an code status to the error message.

isError

Tells you if the returned object is an error (both native error and dmboutput error).