That's not really true. Pretty much every DB driver I know, in every language, will take prepared statement
values that are any valid DB datatype: strings, ints, decimals, etc., and, importantly, JSON values because most DBs now support JSON. Many JS DB frameworks will take any JS object and convert it to a JSON string because that's obviously a trivial operation (it is "JavaScript Object Notation" after all).
Again, the only bug here is the completely incorrect serialization that mysqljs does.