parse-a-little-js
v0.27.0
Published
Slice just enough JavaScript off a string to describe an expression or the closing of a scope
Downloads
54
Readme
If we give the parser any text, either quoted or not, we the text back as "notIdentifier"
e.g. ""foo bar baz"" returns:
{ notIdentifer: "foo bar baz", intro: """, outro: """, }
while "foo bar baz" returns:
{ notIdentifer: "foo bar baz", }
There are some situations where this will trigger out other scenarios.
If you put some variation on "function someValidIdentifier (" then you'll get "function" as the intro
so ""