Last active
November 19, 2022 12:58
-
-
Save jswebschmiede/f2ccd2d5c12daafbe5aa804d44297ed2 to your computer and use it in GitHub Desktop.
Revisions
-
Joerg Schoeneburg revised this gist
Nov 19, 2022 . 1 changed file with 1 addition and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,4 @@ { "Arrow Function": { "prefix": "arrow", "body": ["const $1 = () => {", "$0", "}"], @@ -41,4 +27,4 @@ "body": ["$1.addEventListener('$2', (e) => {", " $0", "});"], "description": "Add Event Listener" } } -
Joerg Schoeneburg created this gist
Nov 19, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ { // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: // "Print to console": { // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } "Arrow Function": { "prefix": "arrow", "body": ["const $1 = () => {", "$0", "}"], "description": "Arrow Function" }, "Fetch": { "prefix": "fetch", "body": [ "try {", " const res = await fetch('$1');", " const data = await res.json();", "", "} catch (err) {", " console.error(err);", "}" ], "description": "Fetch" }, "Get Element by Id": { "prefix": "getid", "body": ["const $el = document.getElementById('$el');"], "description": "Get Element by Id" }, "Add Event Listener": { "prefix": "addevent", "body": ["$1.addEventListener('$2', (e) => {", " $0", "});"], "description": "Add Event Listener" } }