From object to one liner & minimalistic log.
$ npm install --save o1
import log from "o1";
// doge: good, cat: cute
log({ doge: "good", cat: "cute" });
// doge: good - cat: cute
log({ doge: "good", cat: "cute" }, { separator: ' - ' });
Will output a one line string of the keys and values of the passed object
in the format of key: value, key:value...
.
Parameters
obj
Object to convert to a one line logconfig
(optional, default{}
)
Returns any Converted one line log
MIT © Joshua Tonga