MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_js_space

Function is_js_space

codegraph-kernel/src/python.rs:1154–1161  ·  view source on GitHub ↗
(c: char)

Source from the content-addressed store, hash-verified

1152/// `\s` does not, and omits U+FEFF (ZWNBSP), which JS `\s` includes.
1153fn collapse_js_whitespace(s: &str) -> String {
1154 fn is_js_space(c: char) -> bool {
1155 matches!(
1156 c,
1157 '\t' | '\n' | '\u{b}' | '\u{c}' | '\r' | ' ' | '\u{a0}' | '\u{feff}'
1158 | '\u{2028}' | '\u{2029}'
1159 | '\u{1680}' | '\u{2000}'..='\u{200a}' | '\u{202f}' | '\u{205f}' | '\u{3000}'
1160 )
1161 }
1162 let mut out = String::with_capacity(s.len());
1163 let mut in_space = false;
1164 for c in s.chars() {

Callers 1

collapse_js_whitespaceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected