@leafer/debug
Advanced tools
+3
-3
| { | ||
| "name": "@leafer/debug", | ||
| "version": "1.0.0-rc.9", | ||
| "version": "1.0.0-rc.10", | ||
| "description": "@leafer/debug", | ||
@@ -25,7 +25,7 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/math": "1.0.0-rc.9" | ||
| "@leafer/math": "1.0.0-rc.10" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.0.0-rc.9" | ||
| "@leafer/interface": "1.0.0-rc.10" | ||
| } | ||
| } |
+9
-7
@@ -28,11 +28,7 @@ import { IBooleanMap } from '@leafer/interface' | ||
| static set filter(name: string | string[]) { | ||
| if (!name) name = [] | ||
| else if (typeof name === 'string') name = [name] | ||
| this.filterList = name | ||
| this.filterList = getNameList(name) | ||
| } | ||
| static set exclude(name: string | string[]) { | ||
| if (!name) name = [] | ||
| else if (typeof name === 'string') name = [name] | ||
| this.excludeList = name | ||
| this.excludeList = getNameList(name) | ||
| } | ||
@@ -50,3 +46,3 @@ | ||
| tip(...messages: unknown[]): void { | ||
| if (D.enable) console.warn(this.name, ...messages) | ||
| if (D.enable) this.warn(...messages) | ||
| } | ||
@@ -74,2 +70,8 @@ | ||
| function getNameList(name: string | string[]): string[] { | ||
| if (!name) name = [] | ||
| else if (typeof name === 'string') name = [name] | ||
| return name | ||
| } | ||
| const D = Debug |
126
0.8%5908
-0.03%+ Added
- Removed
Updated