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

Commit 4baa84b

Browse files
0.1.3
1 parent ec9713d commit 4baa84b

File tree

3 files changed

+42
-15
lines changed

3 files changed

+42
-15
lines changed

‎README.md‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,35 +235,35 @@ function* ${1:name}(${2:arguments}) {
235235

236236
#### `fe⇥` forEach loop
237237
```javascript
238-
${1:iterable}.forEach((${2:item}) => {
238+
${1}.forEach((${2:item}) => {
239239
${0}
240240
});
241241
```
242242

243243
#### `map⇥` map
244244
```javascript
245-
${1:iterable}.map((${2:item}) => {
245+
${1}.map((${2:item}) => {
246246
${0}
247247
});
248248
```
249249

250250
#### `reduce⇥` reduce
251251
```javascript
252-
${1:iterable}.reduce((${2:previous}, ${3:current}) => {
252+
${1}.reduce((${2:previous}, ${3:current}) => {
253253
${0}
254254
}${4:, initial});
255255
```
256256

257257
#### `filter⇥` filter
258258
```javascript
259-
${1:iterable}.filter(${2:item} => {
259+
${1}.filter(${2:item} => {
260260
${0}
261261
});
262262
```
263263

264264
#### `find⇥` find
265265
```javascript
266-
${1:iterable}.find(${2:item} => {
266+
${1}.find(${2:item} => {
267267
${0}
268268
});
269269
```
@@ -555,16 +555,31 @@ afterEach(() => {
555555
### Console
556556
#### `cl⇥` console.log
557557
```javascript
558-
console.log('${0}', ${0});
558+
console.log(${0});
559559
```
560560

561561
#### `ce⇥` console.error
562562
```javascript
563-
console.error('${0}', ${0});
563+
console.error(${0});
564564
```
565565

566566
#### `cw⇥` console.warn
567567
```javascript
568+
console.warn(${0});
569+
```
570+
571+
#### `cll⇥` console.log labeled
572+
```javascript
573+
console.log('${0}', ${0});
574+
```
575+
576+
#### `cel⇥` console.error labeled
577+
```javascript
578+
console.error('${0}', ${0});
579+
```
580+
581+
#### `cwl⇥` console.warn labeled
582+
```javascript
568583
console.warn('${0}', ${0});
569584
```
570585

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "JavaScriptSnippets",
33
"description": "JavaScript (ES6) code snippets for VS Code",
4-
"version": "0.1.2",
4+
"version": "0.1.3",
55
"displayName": "JavaScript Snippets",
66
"publisher": "nathanchapman",
77
"icon": "images/javascript.png",

‎snippets/snippets.json‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,23 @@
137137
},
138138
"forEach loop": {
139139
"prefix": "fe",
140-
"body": "${1:iterable}.forEach((${2:item}) => {\n\t${0}\n});"
140+
"body": "${1}.forEach((${2:item}) => {\n\t${0}\n});"
141141
},
142142
"map": {
143143
"prefix": "map",
144-
"body": "${1:iterable}.map((${2:item}) => {\n\t${0}\n});"
144+
"body": "${1}.map((${2:item}) => {\n\t${0}\n});"
145145
},
146146
"reduce": {
147147
"prefix": "reduce",
148-
"body": "${1:iterable}.reduce((${2:previous}, ${3:current}) => {\n\t${0}\n}${4:, initial});"
148+
"body": "${1}.reduce((${2:previous}, ${3:current}) => {\n\t${0}\n}${4:, initial});"
149149
},
150150
"filter": {
151151
"prefix": "filter",
152-
"body": "${1:iterable}.filter(${2:item} => {\n\t${0}\n});"
152+
"body": "${1}.filter(${2:item} => {\n\t${0}\n});"
153153
},
154154
"find": {
155155
"prefix": "find",
156-
"body": "${1:iterable}.find(${2:item} => {\n\t${0}\n});"
156+
"body": "${1}.find(${2:item} => {\n\t${0}\n});"
157157
},
158158
// Objects and Classes
159159
"object literal": {
@@ -337,14 +337,26 @@
337337
// Console
338338
"console.log": {
339339
"prefix": "cl",
340-
"body": "console.log('${0}', ${0});"
340+
"body": "console.log(${0});"
341341
},
342342
"console.error": {
343343
"prefix": "ce",
344-
"body": "console.error('${0}', ${0});"
344+
"body": "console.error(${0});"
345345
},
346346
"console.warn": {
347347
"prefix": "cw",
348+
"body": "console.warn(${0});"
349+
},
350+
"console.log labeled": {
351+
"prefix": "cll",
352+
"body": "console.log('${0}', ${0});"
353+
},
354+
"console.error labeled": {
355+
"prefix": "cel",
356+
"body": "console.error('${0}', ${0});"
357+
},
358+
"console.warn labeled": {
359+
"prefix": "cwl",
348360
"body": "console.warn('${0}', ${0});"
349361
},
350362
// Timers

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /