Prevent error parsing prototype functions as regexp objects