Hacker News new | ask | show | jobs
by agumonkey 2106 days ago
can you "stream" conform ? for UI live input

so that "john mcallister" yields { :name "john" :lastname "mcallister" } but "john " would yield { :name "john" :lastname nil } (or :todo even)

1 comments

You could call it on every input change, though I'd say Spec conforming is not the most performant parsing library in the world, so not sure if it be fast enough for running it on each input.
yeah that's why I was looking for a lazy / stream variant in case it wasn't already possible

/me goes to prolog