UNPKG

lux-framework

Version:

Build scalable, Node.js-powered REST APIs with almost no code.

14 lines (11 loc) 263 B
// @flow import isObject from './is-object'; /** * @private */ export default function stringify(value?: ?mixed, spaces?: number) { if (isObject(value) || Array.isArray(value)) { return JSON.stringify(value, null, spaces); } return String(value); }