First pass at a Hanging Protocol implementation and editor (LT-131)
This commit is contained in:
1 parent
dfcb33153f
commit
2e52d9e3c1
157 files changed
+8869
-23585
No files matched your search
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* A global Blaze UI helper to Stringify a JavaScript object
|
||||
*
|
||||
* Credit to:
|
||||
*
|
||||
* http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
|
||||
*/
|
||||
UI.registerHelper('prettyPrintStringify', function(context) {
|
||||
if (!context) {
|
||||
return;
|
||||
}
|
||||
|
||||
var string = JSON.stringify(context, null, 2);
|
||||
string = string.replace(/['"]+/g, '');
|
||||
string = string.replace('{', '');
|
||||
string = string.replace('}', '');
|
||||
string = string.replace(',', '\n');
|
||||
return string;
|
||||
});
|
||||
Reference in new issue
Block a user