MCPcopy Create free account
hub / github.com/messageformat/messageformat / y

Function y

docs/scripts/prettify/prettify.js:45–58  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

43 }
44
45 function y(a) {
46 for (var f = a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g), b = f.length, d = [], c = 0, i = 0; c < b; ++c) {
47 var j = f[c];
48 j === "(" ? ++i : "\\" === j.charAt(0) && (j = +j.substring(1)) && j <= i && (d[j] = -1)
49 }
50 for (c = 1; c < d.length; ++c) - 1 === d[c] && (d[c] = ++t);
51 for (i = c = 0; c < b; ++c) j = f[c], j === "(" ? (++i, d[i] === void 0 && (f[c] = "(?:")) : "\\" === j.charAt(0) && (j = +j.substring(1)) && j <= i && (f[c] = "\\" + d[i]);
52 for (i = c = 0; c < b; ++c)"^" === f[c] && "^" !== f[c + 1] && (f[c] = "");
53 if (a.ignoreCase && s) for (c = 0; c < b; ++c) j = f[c], a = j.charAt(0), j.length >= 2 && a === "[" ? f[c] = h(j) : a !== "\\" && (f[c] = j.replace(/[A-Za-z]/g, function(a) {
54 a = a.charCodeAt(0);
55 return "[" + String.fromCharCode(a & -33, a | 32) + "]"
56 }));
57 return f.join("")
58 }
59 for (var t = 0, s = !1, l = !1, p = 0, d = a.length; p < d; ++p) {
60 var g = a[p];
61 if (g.ignoreCase) l = !0;

Callers 1

LFunction · 0.70

Calls 1

hFunction · 0.70

Tested by

no test coverage detected