Issue #6: first pass at working JS interface for regex2dfa