organism-react-ajax
Advanced tools
Comparing version 0.17.0 to 0.17.1
@@ -74,14 +74,15 @@ "use strict"; | ||
dlog.prototype.isAllObj = function (arr) { | ||
//do each element of arr is a obj ? | ||
for (var i = 0, j = arr.length; i < j; i++) { | ||
if (!isNaN(arr[i] * 1)) { | ||
return false; | ||
dlog.prototype.show = function (level, data) { | ||
var isArray = function isArray(a) { | ||
var keys = Object.keys(a); | ||
for (var i = 0, j = keys.length; i < j; i++) { | ||
if (isNaN(keys[i])) { | ||
return false; | ||
} | ||
} | ||
} | ||
return true; | ||
}; | ||
return true; | ||
}; | ||
dlog.prototype.show = function (level, data) { | ||
var jsonParse = function jsonParse(s) { | ||
@@ -91,3 +92,3 @@ if ("string" === typeof s) { | ||
return JSON.parse(s, function (k, v) { | ||
if (v && typeof v === "object" && !Array.isArray(v)) { | ||
if (v && typeof v === "object") { | ||
var nextObj = Object.create(null); | ||
@@ -122,5 +123,5 @@ Object.keys(v).forEach(function (k) { | ||
data = jsonParse(data); | ||
data[0] = jsonParse(data[0]); | ||
if (Array.isArray(data[0]) && this.isAllObj(data[0])) { | ||
if (isArray(data[0])) { | ||
console.table(data[0]); | ||
@@ -127,0 +128,0 @@ } else { |
@@ -69,14 +69,15 @@ // dlog 0.1.1 | ||
dlog.prototype.isAllObj = function (arr) { | ||
//do each element of arr is a obj ? | ||
for (var i = 0, j = arr.length; i < j; i++) { | ||
if (!isNaN(arr[i] * 1)) { | ||
return false; | ||
dlog.prototype.show = function (level, data) { | ||
var isArray = function isArray(a) { | ||
var keys = Object.keys(a); | ||
for (var i = 0, j = keys.length; i < j; i++) { | ||
if (isNaN(keys[i])) { | ||
return false; | ||
} | ||
} | ||
} | ||
return true; | ||
}; | ||
return true; | ||
}; | ||
dlog.prototype.show = function (level, data) { | ||
var jsonParse = function jsonParse(s) { | ||
@@ -86,3 +87,3 @@ if ("string" === typeof s) { | ||
return JSON.parse(s, function (k, v) { | ||
if (v && typeof v === "object" && !Array.isArray(v)) { | ||
if (v && typeof v === "object") { | ||
var nextObj = Object.create(null); | ||
@@ -117,5 +118,5 @@ Object.keys(v).forEach(function (k) { | ||
data = jsonParse(data); | ||
data[0] = jsonParse(data[0]); | ||
if (Array.isArray(data[0]) && this.isAllObj(data[0])) { | ||
if (isArray(data[0])) { | ||
console.table(data[0]); | ||
@@ -122,0 +123,0 @@ } else { |
{ | ||
"version": "0.17.0", | ||
"version": "0.17.1", | ||
"name": "organism-react-ajax", | ||
@@ -4,0 +4,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80188