Skip to content

Commit c5642b3

Browse files
committed
feat: add ct for console.time
1 parent 2e6c98e commit c5642b3

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ Install from VSCode Extension Marketplace [Hyper JavaScript Snippets](https://ma
137137
| `on` | event handler | `on('${1:event}', ${2:callback});${0}` |
138138

139139
### Console
140-
| Prefix | Desc | Body |
141-
| -----: | --------------------- | --------------------------------- |
142-
| `cl` | console.log | `console.log(${1})${0}` |
143-
| `ce` | console.error | `console.error(${1})${0}` |
144-
| `cw` | console.warn | `console.warn(${1})${0}` |
145-
| `cll` | console.log labeled | `console.log('${1}', ${1})${0}` |
146-
| `cel` | console.error labeled | `console.error('${1}', ${1})${0}` |
147-
| `cwl` | console.warn labeled | `console.warn('${1}', ${1})${0}` |
140+
| Prefix | Desc | Body |
141+
| -----: | --------------------- | ---------------------------------------------------------------------- |
142+
| `cl` | console.log | `console.log(${1})${0}` |
143+
| `ce` | console.error | `console.error(${1})${0}` |
144+
| `cw` | console.warn | `console.warn(${1})${0}` |
145+
| `cll` | console.log labeled | `console.log('${1}', ${1})${0}` |
146+
| `cel` | console.error labeled | `console.error('${1}', ${1})${0}` |
147+
| `cwl` | console.warn labeled | `console.warn('${1}', ${1})${0}` |
148+
| `ct` | console.time | <code>console.time('${1}') <br>${0}<br> console.timeEnd('${1}')</code> |
148149

149150
### Timers
150151
| Prefix | Desc | Body |

snippets/hyper-js.json

+5
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@
340340
"body": "console.warn('${1}', ${1})${0}",
341341
"description": "console.warn labeled"
342342
},
343+
"console.time": {
344+
"prefix": "ct",
345+
"body": "console.time('${1}')\n${0}\nconsole.timeEnd('${1}')",
346+
"description": "console.time"
347+
},
343348

344349
"setTimeout": {
345350
"prefix": "sett",

0 commit comments

Comments
 (0)