open-nomad/ui/app/helpers/stringify-object.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
285 B
JavaScript
Raw Normal View History

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);