Determine if input has a toJSON method that accepts zero or one arguments.
input
toJSON
isJSONable(new Date()); // trueisJSONable({}); // false Copy
isJSONable(new Date()); // trueisJSONable({}); // false
Determine if
inputhas atoJSONmethod that accepts zero or one arguments.