9043512f03
* JSON view init * Overeager config history reverted * Set as query parameter * border added to copy button * More robust stringifyObject helper * Testing for stringify-object helper
14 lines
285 B
JavaScript
14 lines
285 B
JavaScript
import Helper from '@ember/component/helper';
|
|
|
|
/**
|
|
* Changes a JSON object into a string
|
|
*/
|
|
export function stringifyObject(
|
|
[obj],
|
|
{ replacer = null, whitespace = 2 } = {}
|
|
) {
|
|
return JSON.stringify(obj, replacer, whitespace);
|
|
}
|
|
|
|
export default Helper.helper(stringifyObject);
|