pg-hstore
pg-hstore copied to clipboard
Is callback necessary?
I read the source code about hstore.stringify
: https://github.com/scarney81/pg-hstore/blob/master/lib/index.js#L32
if (!callback || callback === null) return joined;
callback(joined);
It also works fine without passing callback
argument. Like this:
const hstore = require('pg-hstore')();
const dataParsed = hstore.parse(data);
const dataStringified = hstore.stringify(data);
Am I correct?
You are correct. This callback is not necessary. If I were re-writing this package I would not have constructed it with a callback signature.
@scarney81 Thanks for reply. The documentation should be updated.
Its more than a year but would you like me to make an update to the README? @scarney81
That would be most welcome @SayakMukhopadhyay