MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / constructor

Method constructor

src/pseudo_json.mjs:2–5  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1class Stream {
2 constructor(str) {
3 this.str = str
4 this.pos = 0
5 }
6
7 err(msg) {
8 throw new SyntaxError(msg + " at " + this.pos + " in " + JSON.stringify(this.str))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected