|
|
@ -60,8 +60,10 @@
|
|
|
|
: ArrayBuffer.isView;
|
|
|
|
: ArrayBuffer.isView;
|
|
|
|
|
|
|
|
|
|
|
|
var formatMessage = function (message) {
|
|
|
|
var formatMessage = function (message) {
|
|
|
|
var notString, type = typeof message;
|
|
|
|
var type = typeof message;
|
|
|
|
if (type !== 'string') {
|
|
|
|
if (type === 'string') {
|
|
|
|
|
|
|
|
return [message, false];
|
|
|
|
|
|
|
|
}
|
|
|
|
if (type === 'object') {
|
|
|
|
if (type === 'object') {
|
|
|
|
if (message === null) {
|
|
|
|
if (message === null) {
|
|
|
|
throw new Error(INPUT_ERROR);
|
|
|
|
throw new Error(INPUT_ERROR);
|
|
|
@ -73,9 +75,7 @@
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
throw new Error(INPUT_ERROR);
|
|
|
|
throw new Error(INPUT_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
notString = true;
|
|
|
|
return [message, true];
|
|
|
|
}
|
|
|
|
|
|
|
|
return [message, notString];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var empty = function (message) {
|
|
|
|
var empty = function (message) {
|
|
|
|