react-native-console-panel
Advanced tools
Comparing version 0.0.6 to 0.0.7
39
index.js
@@ -247,11 +247,12 @@ /** | ||
function formatter(len){ | ||
return (input)=> { | ||
var str = String(input); | ||
var strLen = str.length; | ||
return '0'.repeat(len - strLen) + input; | ||
} | ||
} | ||
function timestamp() { | ||
var d = new Date(); | ||
var formatter = (len)=> { | ||
return (input)=> { | ||
var str = String(input); | ||
var strLen = str.length; | ||
return '0'.repeat(len - strLen) + input; | ||
} | ||
}; | ||
let f2 = formatter(2); | ||
@@ -352,16 +353,12 @@ return f2(d.getHours()) | ||
} | ||
const {log,error,info,warn} = console; | ||
const proxy = (f,name)=>{ | ||
console[name] = function(){ | ||
consoleStack.add(name, arguments[0]); | ||
f.apply(console, arguments) | ||
}; | ||
console['_'+name] = f; | ||
}; | ||
proxy(log,'log'); | ||
proxy(warn,'warn'); | ||
proxy(error,'error'); | ||
proxy(info,'info'); | ||
const methods = ['log','error','warn','info']; | ||
methods.forEach((method)=>{ | ||
var f = console[method]; | ||
console['_'+method] = f; | ||
console[method] = function(){ | ||
consoleStack.add(v, arguments[0]); | ||
f.apply(console, arguments) | ||
} | ||
}); | ||
} | ||
@@ -398,2 +395,2 @@ | ||
}, | ||
}; | ||
}; |
{ | ||
"name": "react-native-console-panel", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "react native component for display console messages. ", | ||
@@ -11,3 +11,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/sospartan/react-native-console-panel" | ||
"url": "https://github.com/NativeSH/react-native-console-panel" | ||
}, | ||
@@ -14,0 +14,0 @@ "keywords": ["react-component","react-native","ios","android","console","debug panel"], |
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
1468368
364