Skip to content

Commit

Permalink
Merge pull request #326 from Sertonix/patch-3
Browse files Browse the repository at this point in the history
use `let` and `const` in js snippets
  • Loading branch information
confused-Techie authored Jan 19, 2023
2 parents bc33b54 + 0a54fed commit 5ff5295
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

## [Unreleased]

### Pulsar
- Changed: use `let` and `const` in js snippets [@Sertonix](https://github.com/pulsar-edit/pulsar/pull/326)

## 1.101.0-beta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
'body': 'else if (${1:true}) {\n\t$2\n}'
'for':
'prefix' : 'for'
'body' : 'for (var ${2:i} = 0; ${2:i} < ${1:array}.length; ${2:i}++) {\n\t${1:array}[${2:i}]$3\n}'
'body' : 'for (let ${2:i} = 0; ${2:i} < ${1:array}.length; ${2:i}++) {\n\t${1:array}[${2:i}]$3\n}'
'for in':
'prefix': 'forin'
'body': 'for (var ${1:variable} in ${2:object}) {\n\t${3:if (${2:object}.hasOwnProperty(${1:variable})) {\n\t\t$4\n\t\\}}\n}'
'body': 'for (const ${1:variable} in ${2:object}) {\n\t${3:if (${2:object}.hasOwnProperty(${1:variable})) {\n\t\t$4\n\t\\}}\n}'
'for of':
'prefix': 'forof'
'body': 'for (var ${1:variable} of ${2:iterable}) {\n\t$3\n}'
'body': 'for (const ${1:variable} of ${2:iterable}) {\n\t$3\n}'
'forEach':
'prefix' : 'foreach'
'body' : 'forEach((${1:item}, ${2:i}) => {\n\t$3\n});\n'
Expand Down

0 comments on commit 5ff5295

Please sign in to comment.