Skip to content

Commit 9f223a6

Browse files
committed
add const object freeze
1 parent 92dc5ef commit 9f223a6

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

.vscode/settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"cSpell.words": [
3-
"buymeacoffee",
43
"cadr",
54
"codr",
65
"deinsoftware",

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Fixed for any bug fixes.
99
Security to invite users to upgrade in case of vulnerabilities.
1010
-->
1111

12+
## 1.9.0 - 2023/05/01
13+
14+
### Added
15+
16+
- constant object freeze snippet
17+
1218
## 1.8.2 - 2023/04/14
1319

1420
### Fixed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Below is a list of all available snippets and the triggers of each one. The `░
9090
| `cn→` | const number | `const ░name = ░0█` | `const ░name: number = ░0█` |
9191
| `cb→` | const boolean | `const ░name = ░true█` | `const ░name: boolean = ░true█` |
9292
| `co→` | const object | `const ░name = {░}█` | `const ░name = {░}█` |
93+
| `co→` | const object freeze | `const ░name = Object.freeze({░})█` | `const ░name = Object.freeze({░})█` |
9394
| `coi→` | const object interface | | `const ░name: Interface = {░}█` |
9495
| `ca→` | const array | `const ░name = [░]█` | `const ░name = [░]█` |
9596
| `cat→` | const array type | | `const ░name: type = [░]█` |

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "const-props-snippets",
33
"description": "VS Code Const & Props snippets for JS and TS",
4-
"version": "1.8.2",
4+
"version": "1.9.0",
55
"displayName": "Const & Props Snippets",
66
"publisher": "deinsoftware",
77
"icon": "images/light-icon.png",

snippets/var-js.json

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"body": "const ${1:name} = {$2}$0",
3030
"description": "Constant Object"
3131
},
32+
"constantObjectFreeze": {
33+
"prefix": "cof",
34+
"body": "const ${1:name} = Object.freeze({$2})$0",
35+
"description": "Constant Object Freeze"
36+
},
3237
"constantArray": {
3338
"prefix": "ca",
3439
"body": "const ${1:name} = [$2]$0",

snippets/var-ts.json

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
"body": "const ${1:name} = {$2}$0",
4040
"description": "Constant Object"
4141
},
42+
"constantObjectFreeze": {
43+
"prefix": "cof",
44+
"body": "const ${1:name} = Object.freeze({$2})$0",
45+
"description": "Constant Object Freeze"
46+
},
4247
"constantObjectInterface": {
4348
"prefix": "coi",
4449
"body": "const ${1:name}: ${3:Interface} = {$2}$0",

0 commit comments

Comments
 (0)