MCPcopy Create free account
hub / github.com/angular-translate/grunt-angular-translate / customStringify

Function customStringify

tasks/angular-translate.js:44–57  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

42 results = {};
43
44 var customStringify = function (val) {
45 if (stringify_options) {
46 return stringify(val, _.isObject(stringify_options) ? stringify_options : {
47 space: ' ',
48 cmp: function (a, b) {
49 var lower = function (a) {
50 return a.toLowerCase();
51 };
52 return lower(a.key) < lower(b.key) ? -1 : 1;
53 }
54 });
55 }
56 return JSON.stringify(val, null, 4);
57 };
58
59 // Use to escape some char into regex patterns
60 var escapeRegExp = function (str) {

Callers 1

Calls 1

lowerFunction · 0.85

Tested by

no test coverage detected