MCPcopy Create free account
hub / github.com/csstools/tokenizer / iterator

Function iterator

src/index.ts:29–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28 /** Returns the most recent state and token yielded from the CSS iterator. */
29 const iterator: CSSIterator = (): CSSIteration => (
30 state.tick >= state.size
31 ? {
32 done: true,
33 value: [ state.tick, -1, '', '', '' ]
34 }
35 : {
36 done: false,
37 value: consume(state),
38 }
39 )
40
41 iterator[Symbol.iterator] = () => ({ next: iterator })
42

Callers 1

index.test.tsFile · 0.85

Calls 1

consumeFunction · 0.85

Tested by

no test coverage detected