Closed
Description
The js code for Data.String.Unsafe.char looks like this:
exports.char = function (s) {
if (s.length !== 1) return s.charAt(0);
throw new Error("Data.String.Unsafe.char: Expected string of length 1.");
};
I'm pretty sure that line on line 21 that !==
is meant to be an ===
; atm the function's bugging out for good inputs & vice versa. Should be:
if (s.length === 1) return s.charAt(0);
Metadata
Metadata
Assignees
Labels
No labels