massive
Version:
A small query tool for Postgres that embraces json and makes life simpler
18 lines (14 loc) • 328 B
JavaScript
;
const _ = require('lodash');
/**
* Stringify a value or value array.
*
* @param {Any} value - The value to stringify.
* @return {String|Array} The processed value.
*/
exports = module.exports = value => {
if (_.isArray(value)) {
return value.map(v => v.toString());
}
return value.toString();
};