MCPcopy Index your code
hub / github.com/dataease/SQLBot / cssEscape

Function cssEscape

frontend/public/swagger-ui-bundle.js:143–169  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

141 (s.exports = (function (s) {
142 if (s.CSS && s.CSS.escape) return s.CSS.escape
143 var cssEscape = function (s) {
144 if (0 == arguments.length) throw new TypeError('`CSS.escape` requires an argument.')
145 for (
146 var o, i = String(s), a = i.length, u = -1, _ = '', w = i.charCodeAt(0);
147 ++u < a;
148 )
149 0 != (o = i.charCodeAt(u))
150 ? (_ +=
151 (o >= 1 && o <= 31) ||
152 127 == o ||
153 (0 == u && o >= 48 && o <= 57) ||
154 (1 == u && o >= 48 && o <= 57 && 45 == w)
155 ? '\\' + o.toString(16) + ' '
156 : (0 == u && 1 == a && 45 == o) ||
157 !(
158 o >= 128 ||
159 45 == o ||
160 95 == o ||
161 (o >= 48 && o <= 57) ||
162 (o >= 65 && o <= 90) ||
163 (o >= 97 && o <= 122)
164 )
165 ? '\\' + i.charAt(u)
166 : i.charAt(u))
167 : (_ += '�')
168 return _
169 }
170 return (s.CSS || (s.CSS = {}), (s.CSS.escape = cssEscape), cssEscape)
171 })(a)))
172 },

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected