Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Below is a list of all available snippets and the triggers of each one. The **
| `fin→` | for ... in loop `for(const item in object) {}` |
| `anfn→` | creates an anonymous function `(params) => {}` |
| `nfn→` | creates a named function `const add = (params) => {}` |
| `asnfn→` | creates an async named function `const add = async (params) => {}` |
| `dob→` | destructing object syntax `const {rename} = fs` |
| `dar→` | destructing array syntax `const [first, second] = [1,2]` |
| `sti→` | set interval helper method `setInterval(() => {});` |
Expand Down
5 changes: 5 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
"body": "const ${1:name} = (${2:params}) => {\n\t${3}\n}",
"description": "Creates a named function in ES6 syntax"
},
"asyncNamedFunction": {
"prefix": "asnfn",
"body": "const ${1:name} = async (${2:params}) => {\n\t${3}\n}",
"description": "Creates an async named function in ES6 syntax"
},
"destructingObject": {
"prefix": "dob",
"body": "const {${2:propertyName}} = ${1:objectToDestruct};",
Expand Down