Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit83aaccf

Browse files
committed
feat: replace console.log with better support for nested / circular objects
1 parente40d3bd commit83aaccf

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"dependencies": {
4545
"he":"^1.1.1",
4646
"lint-staged":"^4.3.0",
47+
"util-inspect":"^0.1.8",
4748
"vue":"^2.5.8"
4849
},
4950
"peerDependencies": {

‎platform/nativescript/framework.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
importinspectfrom'util-inspect'
2+
3+
console.log=(function(log,inspect){
4+
returnfunction(){
5+
returnlog.apply(
6+
this,
7+
Array.prototype.map.call(arguments,function(arg){
8+
returninspect(arg,{depth:1,colors:true})
9+
})
10+
)
11+
}
12+
})(console.log,inspect)
13+
114
console.keys=function(object){
2-
console.dir(Object.keys(object))
15+
console.log(Object.keys(object))
316
}
417

518
// This is required because some of the third party plugins rely on this

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp