Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/braziljs/eloquente-javascript
/ skipSpace
Function
skipSpace
code/solutions/12_3_comments.js:1–4 ·
view source on GitHub ↗
(string)
Source
from the content-addressed store, hash-verified
1
function
skipSpace(string) {
2
let
skippable = string.match(/^(\s|#.*)*/);
3
return
string.slice(skippable[0].length);
4
}
5
6
console.log(parse(
"# hello\nx"
));
7
// → {type: "word", name: "x"}
Callers
nothing calls this directly
Calls
2
match
Method · 0.80
slice
Method · 0.45
Tested by
no test coverage detected