Skip to content

Commit 1fd490d

Browse files
authored
Merge pull request #1 from deinsoftware/dev
add console table destructuring
2 parents 3f29d13 + e3271e7 commit 1fd490d

File tree

4 files changed

+36
-24
lines changed

4 files changed

+36
-24
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Fixed for any bug fixes.
99
Security to invite users to upgrade in case of vulnerabilities.
1010
-->
1111

12+
## [1.1.0] - 2022/07/27
13+
14+
### Added
15+
16+
- Console table destructuring
17+
1218
## [1.0.4] - 2022/07/07
1319

1420
### Fixed

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,42 +70,43 @@ Below is a list of all available snippets and the triggers of each one. The **$*
7070
### Code
7171

7272
| Trigger | Description | Result JS/TS |
73-
| ------: | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
74-
| `dbg→` | [debugger](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | `debugger█` |
75-
| `cl→` | [log](https://developer.mozilla.org/en-US/docs/Web/API/Console/log) | `console.log($name)█` |
73+
| ------: | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
74+
| `dbg→` | [debugger](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) | `debugger█` |
75+
| `cl→` | [log](https://developer.mozilla.org/en-US/docs/Web/API/Console/log) | `console.log($name)█` |
7676
| `clm→` | log with message | `console.log('$name:', $name)█` |
77-
| `cld→` | log with destructuring | `console.log({$name})█` |
77+
| `cld→` | log with destructuring | `console.log({$name})█` |
7878
| `clj→` | log with json | `console.log('$obj:', JSON.stringify($obj, null, 2))█` |
79-
| `cd→` | [debug](https://developer.mozilla.org/en-US/docs/Web/API/Console/debug) | `console.debug($name)█` |
79+
| `cd→` | [debug](https://developer.mozilla.org/en-US/docs/Web/API/Console/debug) | `console.debug($name)█` |
8080
| `cdm→` | debug with message | `console.debug('$name:', $name)█` |
81-
| `cdd→` | debug with destructuring | `console.debug({$name})█` |
81+
| `cdd→` | debug with destructuring | `console.debug({$name})█` |
8282
| `cdj→` | debug with json | `console.debug('$obj:', JSON.stringify($obj, null, 2))█` |
83-
| `ci→` | [info](https://developer.mozilla.org/en-US/docs/Web/API/Console/info) | `console.info($name)█` |
83+
| `ci→` | [info](https://developer.mozilla.org/en-US/docs/Web/API/Console/info) | `console.info($name)█` |
8484
| `cim→` | info with message | `console.info('$name:', $name)█` |
85-
| `cid→` | info with destructuring | `console.info({$name})` |
85+
| `cid→` | info with destructuring | `console.info({$name})` |
8686
| `cij→` | info with json | `console.info('$obj:', JSON.stringify($obj, null, 2))█` |
87-
| `ce→` | [error](https://developer.mozilla.org/en-US/docs/Web/API/Console/error) | `console.error($name)█` |
87+
| `ce→` | [error](https://developer.mozilla.org/en-US/docs/Web/API/Console/error) | `console.error($name)█` |
8888
| `cem→` | error with message | `console.error('$name:', $name)█` |
89-
| `ced→` | error with destructuring | `console.error({$name})█` |
89+
| `ced→` | error with destructuring | `console.error({$name})█` |
9090
| `cej→` | info with json | `console.error('$obj:', JSON.stringify($obj, null, 2))█` |
91-
| `cw→` | [warn](https://developer.mozilla.org/en-US/docs/Web/API/Console/warn) | `console.warn($name)█` |
91+
| `cw→` | [warn](https://developer.mozilla.org/en-US/docs/Web/API/Console/warn) | `console.warn($name)█` |
9292
| `cwm→` | warn with message | `console.warn('$name:', $name)█` |
93-
| `cwd→` | warn with destructuring | `console.warn({$name}█)` |
93+
| `cwd→` | warn with destructuring | `console.warn({$name}█)` |
9494
| `cwj→` | info with json | `console.warn('$obj:', JSON.stringify($obj, null, 2))█` |
95-
| `ct→` | [table](https://developer.mozilla.org/en-US/docs/Web/API/Console/table) | `console.table($collection)█` |
95+
| `ct→` | [table](https://developer.mozilla.org/en-US/docs/Web/API/Console/table) | `console.table($collection)█` |
96+
| `ctd→` | table with destructuring | `console.table({$name})█` |
9697
| `ca→` | [assert](https://developer.mozilla.org/en-US/docs/Web/API/Console/assert) | `console.assert($expression, $name)█` |
97-
| `cdr→` | [dir](https://developer.mozilla.org/en-US/docs/Web/API/Console/dir) | `console.dir($name)█` |
98-
| `ctr→` | [trace](https://developer.mozilla.org/en-US/docs/Web/API/Console/trace) | `console.trace($name)█` |
99-
| `cc→` | [count](https://developer.mozilla.org/en-US/docs/Web/API/Console/count) | `console.count($label)█` |
100-
| `ccr→` | [count reset](https://developer.mozilla.org/en-US/docs/Web/API/Console/countReset) | `console.countReset($label)█` |
101-
| `cts→` | [time start](https://developer.mozilla.org/en-US/docs/Web/API/Console/time) | `console.time($label)█` |
102-
| `ctl→` | [time log](https://developer.mozilla.org/en-US/docs/Web/API/console/timeLog) | `console.timeLog($label)█` |
103-
| `cte→` | [time end](https://developer.mozilla.org/en-US/docs/Web/API/console/timeEnd) | `console.timeEnd($label)█` |
98+
| `cdr→` | [dir](https://developer.mozilla.org/en-US/docs/Web/API/Console/dir) | `console.dir($name)█` |
99+
| `ctr→` | [trace](https://developer.mozilla.org/en-US/docs/Web/API/Console/trace) | `console.trace($name)█` |
100+
| `cc→` | [count](https://developer.mozilla.org/en-US/docs/Web/API/Console/count) | `console.count($label)█` |
101+
| `ccr→` | [count reset](https://developer.mozilla.org/en-US/docs/Web/API/Console/countReset) | `console.countReset($label)█` |
102+
| `cts→` | [time start](https://developer.mozilla.org/en-US/docs/Web/API/Console/time) | `console.time($label)█` |
103+
| `ctl→` | [time log](https://developer.mozilla.org/en-US/docs/Web/API/console/timeLog) | `console.timeLog($label)█` |
104+
| `cte→` | [time end](https://developer.mozilla.org/en-US/docs/Web/API/console/timeEnd) | `console.timeEnd($label)█` |
104105
| `ctw→` | time wrapper | <code>console.time($label)<br/>█<br/>console.timeEnd($label)</code> |
105-
| `cgs→` | [group start](https://developer.mozilla.org/en-US/docs/Web/API/Console/group) | `console.group($label)█` |
106-
| `cge→` | [group end](https://developer.mozilla.org/en-US/docs/Web/API/console/groupEnd) | `console.groupEnd($label)█` |
106+
| `cgs→` | [group start](https://developer.mozilla.org/en-US/docs/Web/API/Console/group) | `console.group($label)█` |
107+
| `cge→` | [group end](https://developer.mozilla.org/en-US/docs/Web/API/console/groupEnd) | `console.groupEnd($label)█` |
107108
| `cgw→` | group wrapper | <code>console.group($label)<br/>█<br/>console.groupEnd($label)</code> |
108-
| `clr→` | [clear](https://developer.mozilla.org/en-US/docs/Web/API/Console/clear) | `console.clear()█` |
109+
| `clr→` | [clear](https://developer.mozilla.org/en-US/docs/Web/API/Console/clear) | `console.clear()█` |
109110

110111
### Styles
111112

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "debug-snippets",
33
"description": "VS Code Debug snippets for JS, TS and CSS",
4-
"version": "1.0.4",
4+
"version": "1.1.0",
55
"displayName": "Debug Snippets",
66
"publisher": "deinsoftware",
77
"icon": "images/light-icon.png",

snippets/code.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@
109109
"body": "console.table(${1:collection})$0",
110110
"description": "Console Table"
111111
},
112+
"consoleTableDestructuring": {
113+
"prefix": "cld",
114+
"body": "console.table({${1:name}})$0",
115+
"description": "Console Table with Destructuring"
116+
},
112117
"consoleAssert": {
113118
"prefix": "ca",
114119
"body": "console.assert(${1:expression}, ${2:name})$0",

0 commit comments

Comments
 (0)