Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

Commit f4ffae0

Browse files
committed
Fix JSON.stringify snippet
Update snippets.code-snippets and README.md
2 parents 0ffe756 + e3fa24b commit f4ffae0

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this extension will be documented in this file.
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## [0.7.2] - 2022-12-22
8+
9+
### Fixed
10+
11+
- Fixed `JSON.stringify` snippet. It was a copy and paste fail from `JSON.parse` snippet, which has the same information in the *snippets.code-snippets* and *README.md*.
12+
13+
### Added
14+
15+
- Added sponsor filed to package.json.
16+
717
## [0.7.1] - 2021-09-15
818

919
### Fixed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ I didn't repeat any of the builtin JavaScript snippets (see [FAQ for more](#wher
155155
<tr>
156156
<td>json stringify</td>
157157
<td>Convert a JavaScript object to a JSON string.</td>
158-
<td>let ${1:string} = JSON.parse(${2:obj});<br>$0<br></td>
158+
<td>let ${1:string} = JSON.stringify(${2:obj});<br>$0<br></td>
159159
</tr>
160160
</tbody>
161161
</table>

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"description": "Descriptive, easy to find JavaScript snippets, without nonsense abbreviations.",
99
"icon": "img/logo.png",
10-
"version": "0.7.1",
10+
"version": "0.7.2",
1111
"engines": {
1212
"vscode": ">=1.0.0"
1313
},
@@ -18,6 +18,9 @@
1818
"type": "git",
1919
"url": "https://github.com/robole/vscode-javascript-snippets"
2020
},
21+
"sponsor": {
22+
"url": "https://ko-fi.com/roboleary"
23+
},
2124
"license": "MIT",
2225
"categories": [
2326
"Snippets"

snippets/snippets.code-snippets

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
"JSON.stringify": {
150150
"prefix": "json stringify",
151-
"body": ["let ${1:string} = JSON.parse(${2:obj});", "$0"],
151+
"body": ["let ${1:string} = JSON.stringify(${2:obj});", "$0"],
152152
"description": "Convert a JavaScript object to a JSON string."
153153
}
154154
}

0 commit comments

Comments
 (0)