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 8e10e13

Browse files
committed
refactor: removed hasOwnProperty check in foi
1 parent c574c5d commit 8e10e13

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ Related snippets shared a same namespace, like for every `for` loop snippets pre
5858
| `case` | switch's case | `case 1ドル : 0ドル` |
5959

6060
### Statement
61-
| Prefix | Desc | Body |
62-
| -----: | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
63-
| `fo` | for loop | `for (1ドル ; 2ドル ; 3ドル) 0ドル` |
64-
| `foi` | for in loop | <code>for (const 1ドル in 2ドル) {<br>&nbsp;&nbsp;if (2ドル.hasOwnProperty(1ドル)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;0ドル<br>&nbsp;&nbsp;}<br>}</code> |
65-
| `fof` | for of loop (ES2015) | `for (const 1ドル of 2ドル) 0ドル` |
66-
| `foa` | for await of loop (ES2018) | `for await (const 1ドル of 2ドル) 0ドル` |
67-
| `wh` | while loop | `while (1ドル) 0ドル` |
68-
| `tc` | try/catch | `try {1ドル} catch 2ドル {0ドル}` |
69-
| `tf` | try/finally | `try {1ドル} finally {0ドル}` |
70-
| `tcf` | try/catch/finally | `try {1ドル} catch 2ドル {3ドル} finally {0ドル}` |
61+
| Prefix | Desc | Body |
62+
| -----: | -------------------------- | ------------------------------------- |
63+
| `fo` | for loop | `for (1ドル ; 2ドル ; 3ドル) 0ドル` |
64+
| `foi` | for in loop | `for (const 1ドル in 2ドル) 0ドル` |
65+
| `fof` | for of loop (ES2015) | `for (const 1ドル of 2ドル) 0ドル` |
66+
| `foa` | for await of loop (ES2018) | `for await (const 1ドル of 2ドル) 0ドル` |
67+
| `wh` | while loop | `while (1ドル) 0ドル` |
68+
| `tc` | try/catch | `try {1ドル} catch 2ドル {0ドル}` |
69+
| `tf` | try/finally | `try {1ドル} finally {0ドル}` |
70+
| `tcf` | try/catch/finally | `try {1ドル} catch 2ドル {3ドル} finally {0ドル}` |
7171

7272
### Functions
7373
| Prefix | Desc | Body |

‎src/snippet/javascript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const javascript = createXSnippets({
6161
},
6262
foi: {
6363
name: 'for in loop',
64-
body: 'for (const 1ドル in 2ドル) {\n\tif (2ドル.hasOwnProperty(1ドル)) {\n\t\t0ドル\n\t}\n}',
64+
body: 'for (const 1ドル in 2ドル) 0ドル',
6565
},
6666
fof: {
6767
name: 'for of loop (ES2015)',

0 commit comments

Comments
(0)

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