Skip to content

Commit b593603

Browse files
committed
Destructuring assignment
1 parent 0c7e7b6 commit b593603

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ let ${1:name}
4545
let ${1:name} = ${2:value}
4646
```
4747

48+
#### `l={⇥` destructuring let assignment
49+
```js
50+
let { ${1: name} } = ${2:value}
51+
```
52+
4853
#### `co⇥` const statement
4954
```js
5055
const ${1:name}
@@ -55,6 +60,11 @@ const ${1:name}
5560
const ${1:name} = ${2:value}
5661
```
5762

63+
#### `co={⇥` destructuring const assignment
64+
```js
65+
const { ${1:name} } = ${2:value}
66+
```
67+
5868
### Flow Control
5969

6070
#### `if⇥` if statement

snippets/declarations.cson

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
"let assignment":
1212
prefix: "l="
1313
body: "let ${1:name} = ${2:value}"
14+
"destructuring let assignment":
15+
prefix: "l={"
16+
body: "let { ${1: name} } = ${2:value}"
1417
"const statement":
1518
prefix: "co"
1619
body: "const ${1:name}"
1720
"const assignment":
1821
prefix: "co="
1922
body: "const ${1:name} = ${2:value}"
23+
"destructuring const assignment":
24+
prefix: "co={"
25+
body: "const { ${1:name} } = ${2:value}"

0 commit comments

Comments
 (0)