Closed croonerg closed 6 years ago
@croonerg Under what browser/environment are you receiving this error? An é
character is valid in identifiers since the ECMAScript 3rd edition specifications in 1999 (see section 7.6).
My guess is that you have copy/pasted the code into an .html
file whose character encoding does not match the character set specified for the file. If you save your file with UTF-8 encoding and then put <meta charset="utf-8">
in the <head>
(for an HTML5 document) your problem will disappear.
@Phrogz Chrome 63.0.3239.132 64-bit, Win7 Enterprise 64-bit. I've got your npm installed to node_modules, then browserifying it to a single bundle along with my own js code, then included the bundle in a html test page with <script src=....
<meta charset="utf-8">
works, but puts an extra requirement on testing this bundle locally on systems where language settings make it get another encoding than utf8.
All occurences of sampleCubicBézier has an é in it which makes browser complain about "Uncaught SyntaxError: Invalid or unexpected token".