├── .gitignore ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── images └── javascript.png ├── package.json └── snippets └── snippets.json /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | CHANGELOG.md 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.7.1] - 2018-10-07 2 | ### Updated 3 | - Minor improvements in Readme and `thenCatch`, `exportNamedFunction`, `exportDefaultFunction` snippets 4 | 5 | ## [1.7.0] - 2018-06-24 6 | ### Added 7 | - Add snippet for `require` and `default module exports` 8 | 9 | ## [1.6.0] - 2018-04-16 10 | ### Changed 11 | - Fix the order for object and array destructuring 12 | - Add snippet to handle promises (then, catch) 13 | - Add console.log object 14 | 15 | ## [1.5.0] - 2017-09-26 16 | ### Changed 17 | - Update `forof` and `forin` statements 18 | - Add Vue file type support 19 | 20 | ## [1.4.1] - 2017-06-26 21 | ### Changed 22 | - Add `console.table` sippet 23 | 24 | ## [1.4.0] - 2017-02-05 25 | ### Changed 26 | - Change the spacing in import statements 27 | - Add support for HTML extension files 28 | - Console info snippet [#18] 29 | - Add snippet for importing ES6 module without module name 30 | 31 | ## [1.2.0] - 2016-10-09 32 | ### Changed 33 | - Input filename before variables in imports 34 | - Add snippet for creating Promise 35 | 36 | ## [1.1.0] - 2016-08-12 37 | ### Changed 38 | - Fix the cursor behavior when using `imp` to import a module 39 | - Change the trigger for creating anonymous function (`afn -> anfn`) 40 | 41 | ## [1.0.0] - 2016-05-05 42 | ### Changed 43 | - Add support for JavaScript React and TypeScript React 44 | 45 | ## [0.3.0] - 2016-01-17 46 | ### Changed 47 | - Remove new line addition from all import snippets 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Charalampos Karypidis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JavaScript 2 | ## VS Code JavaScript (ES6) snippets 3 | ------------------- 4 | 5 | [![Version](https://vsmarketplacebadge.apphb.com/version/xabikos.JavaScriptSnippets.svg)](https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets) 6 | [![Installs](https://vsmarketplacebadge.apphb.com/installs/xabikos.JavaScriptSnippets.svg)](https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets) 7 | [![Ratings](https://vsmarketplacebadge.apphb.com/rating/xabikos.JavaScriptSnippets.svg)](https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets) 8 | 9 | This extension contains code snippets for JavaScript in ES6 syntax for [Vs Code][code] editor (supports both JavaScript and TypeScript). 10 | 11 | ### Note 12 | **All the snippets include the final semicolon `;` There is a fork of those snippets [here](https://marketplace.visualstudio.com/items?itemName=jmsv.JavaScriptSnippetsStandard) 13 | made by @jmsv where semicolons are not included. So feel free to use them according to your needs.** 14 | 15 | ## Sponsors 16 |


17 | Request and perform code reviews from inside your IDE. Review any code, even if it's a work-in-progress that hasn't been committed yet, and use jump-to-definition, your favorite keybindings, and other IDE tools.
Try it free

18 | 19 | 20 | ## Installation 21 | 22 | In order to install an extension you need to launch the Command Palette (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions. 23 | There you have either the option to show the already installed snippets or install new ones. Search for *JavaScript (ES6) code snippets* and install it. 24 | 25 | ## Supported languages (file extensions) 26 | * JavaScript (.js) 27 | * TypeScript (.ts) 28 | * JavaScript React (.jsx) 29 | * TypeScript React (.tsx) 30 | * Html (.html) 31 | * Vue (.vue) 32 | 33 | ## Snippets 34 | 35 | Below is a list of all available snippets and the triggers of each one. The **⇥** means the `TAB` key. 36 | 37 | ### Import and export 38 | | Trigger | Content | 39 | | -------: | ------- | 40 | | `imp→` | imports entire module `import fs from 'fs';`| 41 | | `imn→` | imports entire module without module name `import 'animate.css'` | 42 | | `imd→` | imports only a portion of the module using destructing `import {rename} from 'fs';` | 43 | | `ime→` | imports everything as alias from the module `import * as localAlias from 'fs';` | 44 | | `ima→` | imports only a portion of the module as alias `import { rename as localRename } from 'fs';` | 45 | | `rqr→` | require package `require('');`| 46 | | `req→` | require package to const `const packageName = require('packageName');`| 47 | | `mde→` | default module.exports `module.exports = {};`| 48 | | `env→` | exports name variable `export const nameVariable = localVariable;` | 49 | | `enf→` | exports name function `export const log = (parameter) => { console.log(parameter);};` | 50 | | `edf→` | exports default function `export default function fileName (parameter){ console.log(parameter);};` | 51 | | `ecl→` | exports default class `export default class Calculator { };` | 52 | | `ece→` | exports default class by extending a base one `export default class Calculator extends BaseClass { };` | 53 | 54 | ### Class helpers 55 | | Trigger | Content | 56 | | -------: | ------- | 57 | | `con→` | adds default constructor in the class `constructor() {}`| 58 | | `met→` | creates a method inside a class `add() {}` | 59 | | `pge→` | creates a getter property `get propertyName() {return value;}` | 60 | | `pse→` | creates a setter property `set propertyName(value) {}` | 61 | 62 | ### Various methods 63 | | Trigger | Content | 64 | | -------: | ------- | 65 | | `fre→` | forEach loop in ES6 syntax `array.forEach(currentItem => {})`| 66 | | `fof→` | for ... of loop `for(const item of object) {}` | 67 | | `fin→` | for ... in loop `for(const item in object) {}` | 68 | | `anfn→` | creates an anonymous function `(params) => {}` | 69 | | `nfn→` | creates a named function `const add = (params) => {}` | 70 | | `dob→` | destructing object syntax `const {rename} = fs` | 71 | | `dar→` | destructing array syntax `const [first, second] = [1,2]` | 72 | | `sti→` | set interval helper method `setInterval(() => {});` | 73 | | `sto→` | set timeout helper method `setTimeout(() => {});` | 74 | | `prom→` | creates a new Promise `return new Promise((resolve, reject) => {});`| 75 | | `thenc→` | adds then and catch declaration to a promise `.then((res) => {}).catch((err) => {});`| 76 | 77 | ### Console methods 78 | | Trigger | Content | 79 | | -------: | ------- | 80 | | `cas→` | console alert method `console.assert(expression, object)`| 81 | | `ccl→` | console clear `console.clear()` | 82 | | `cco→` | console count `console.count(label)` | 83 | | `cdb→` | console debug `console.debug(object)` | 84 | | `cdi→` | console dir `console.dir` | 85 | | `cer→` | console error `console.error(object)` | 86 | | `cgr→` | console group `console.group(label)` | 87 | | `cge→` | console groupEnd `console.groupEnd()` | 88 | | `clg→` | console log `console.log(object)` | 89 | | `clo→` | console log object with name `console.log('object :>> ', object);` | 90 | | `ctr→` | console trace `console.trace(object)` | 91 | | `cwa→` | console warn `console.warn` | 92 | | `cin→` | console info `console.info` | 93 | | `clt→` | console table `console.table` | 94 | | `cti→` | console time `console.time` | 95 | | `cte→` | console timeEnd `console.timeEnd` | 96 | 97 | [code]: https://code.visualstudio.com/ 98 | -------------------------------------------------------------------------------- /images/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xabikos/vscode-javascript/ecfeba765ebdaff72b23e7a5d030e35c941a7c30/images/javascript.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JavaScriptSnippets", 3 | "description": "Code snippets for JavaScript in ES6 syntax", 4 | "version": "1.8.0", 5 | "displayName": "JavaScript (ES6) code snippets", 6 | "publisher": "xabikos", 7 | "icon": "images/javascript.png", 8 | "license": "SEE LICENSE IN LICENSE.md", 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/xabikos/vscode-javascript" 12 | }, 13 | "engines": { 14 | "vscode": "0.10.x" 15 | }, 16 | "categories": [ 17 | "Snippets" 18 | ], 19 | "contributes": { 20 | "snippets": [ 21 | { 22 | "language": "javascript", 23 | "path": "./snippets/snippets.json" 24 | }, { 25 | "language": "typescript", 26 | "path": "./snippets/snippets.json" 27 | }, { 28 | "language": "javascriptreact", 29 | "path": "./snippets/snippets.json" 30 | }, { 31 | "language": "typescriptreact", 32 | "path": "./snippets/snippets.json" 33 | }, { 34 | "language": "html", 35 | "path": "./snippets/snippets.json" 36 | }, { 37 | "language": "vue", 38 | "path": "./snippets/snippets.json" 39 | } 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /snippets/snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": { 3 | "prefix": "imp", 4 | "body": "import ${2:moduleName} from '${1:module}';$0", 5 | "description": "Imports entire module statement in ES6 syntax" 6 | }, 7 | "importNoModuleName": { 8 | "prefix": "imn", 9 | "body": "import '${1:module}';$0", 10 | "description": "Imports entire module in ES6 syntax without module name" 11 | }, 12 | "importDestructing": { 13 | "prefix": "imd", 14 | "body": "import { $2 } from '${1:module}';$0", 15 | "description": "Imports only a portion of the module in ES6 syntax" 16 | }, 17 | "importEverything": { 18 | "prefix": "ime", 19 | "body": "import * as ${2:alias} from '${1:module}';$0", 20 | "description": "Imports everything as alias from the module in ES6 syntax" 21 | }, 22 | "importAs": { 23 | "prefix": "ima", 24 | "body": "import { ${2:originalName} as ${3:alias} } from '${1:module}';$0", 25 | "description": "Imports a specific portion of the module by assigning a local alias in ES6 syntax" 26 | }, 27 | "require": { 28 | "prefix": "rqr", 29 | "body": "require('${1:package}');", 30 | "description": "Require a package" 31 | }, 32 | "requireToConst": { 33 | "prefix": "req", 34 | "body": "const ${1:packageName} = require('${1:package}');$0", 35 | "description": "Require a package to const" 36 | }, 37 | "moduleExports": { 38 | "prefix": "mde", 39 | "body": "module.exports = {\n\t$0\n};\n", 40 | "description": "Module exports from Common JS, node syntax at ES6" 41 | }, 42 | "exportNamedVariable": { 43 | "prefix": "env", 44 | "body": "export const ${1:exportVariable} = ${2:localVariable};\n", 45 | "description": "Export named variable in ES6 syntax" 46 | }, 47 | "exportNamedFunction": { 48 | "prefix": "enf", 49 | "body": "export const ${1:functionName} = (${2:params}) => {\n\t$0\n};\n", 50 | "description": "Export named function in ES6 syntax" 51 | }, 52 | "exportDefaultFunction": { 53 | "prefix": "edf", 54 | "body": "export default function ${1:${TM_FILENAME_BASE}}(${2:params}) {\n\t$0\n};\n", 55 | "description": "Export default function in ES6 syntax" 56 | }, 57 | "exportClass": { 58 | "prefix": "ecl", 59 | "body": "export default class ${1:className} {\n\t$0\n};\n", 60 | "description": "Export default class in ES6 syntax" 61 | }, 62 | "exportClassExtends": { 63 | "prefix": "ece", 64 | "body": "export default class ${1:className} extends ${2:baseclassName} {\n\t$0\n};\n", 65 | "description": "Export default class which extends a base one in ES6 syntax" 66 | }, 67 | 68 | "constructor": { 69 | "prefix": "con", 70 | "body": "constructor(${1:params}) {\n\t${0}\n}", 71 | "description": "Add default constructor in a class in ES6 syntax" 72 | }, 73 | "method": { 74 | "prefix": "met", 75 | "body": "${1:methodName}(${2:params}) {\n\t${0}\n}", 76 | "description": "Creates a method inside a class in ES6 syntax" 77 | }, 78 | "propertyGet": { 79 | "prefix": "pge", 80 | "body": "get ${1:propertyName}() {\n\treturn this.${0};\n}", 81 | "description": "Creates a getter property inside a class in ES6 syntax" 82 | }, 83 | "propertyset": { 84 | "prefix": "pse", 85 | "body": "set ${1:propertyName}(${2:value}) {\n\t${0};\n}", 86 | "description": "Creates a setter property inside a class in ES6 syntax" 87 | }, 88 | 89 | "forEach": { 90 | "prefix": "fre", 91 | "body": "${1:array}.forEach(${2:currentItem} => {\n\t${0}\n});", 92 | "description": "Creates a forEach statement in ES6 syntax" 93 | }, 94 | "forOf": { 95 | "prefix": "fof", 96 | "body": "for (const ${1:item} of ${2:object}) {\n\t${0}\n}", 97 | "description": "Iterating over property names of iterable objects" 98 | }, 99 | "forIn": { 100 | "prefix": "fin", 101 | "body": "for (const ${1:item} in ${2:object}) {\n\t${0}\n}", 102 | "description": "Iterating over property values of iterable objects" 103 | }, 104 | "anonymousFunction": { 105 | "prefix": "anfn", 106 | "body": "(${1:params}) => {\n\t${2}\n}", 107 | "description": "Creates an anonymous function in ES6 syntax" 108 | }, 109 | "namedFunction": { 110 | "prefix": "nfn", 111 | "body": "const ${1:name} = (${2:params}) => {\n\t${3}\n}", 112 | "description": "Creates a named function in ES6 syntax" 113 | }, 114 | "destructingObject": { 115 | "prefix": "dob", 116 | "body": "const {${2:propertyName}} = ${1:objectToDestruct};", 117 | "description": "Creates and assigns a local variable using object destructing" 118 | }, 119 | "destructingArray": { 120 | "prefix": "dar", 121 | "body": "const [${2:propertyName}] = ${1:arrayToDestruct};", 122 | "description": "Creates and assigns a local variable using array destructing" 123 | }, 124 | "setInterval": { 125 | "prefix": "sti", 126 | "body": "setInterval(() => {\n\t${2}\n}, ${0:intervalInms});", 127 | "description": "Executes the given function at specified intervals in ES6 syntax" 128 | }, 129 | "setTimeOut": { 130 | "prefix": "sto", 131 | "body": "setTimeout(() => {\n\t${2}\n}, ${1:delayInms});", 132 | "description": "Executes the given function after the specified delay in ES6 syntax" 133 | }, 134 | "promise": { 135 | "prefix": "prom", 136 | "body": "return new Promise((resolve, reject) => {\n\t${1}\n});", 137 | "description": "Creates and returns a new Promise in the standard ES6 syntax" 138 | }, 139 | "thenCatch": { 140 | "prefix": "thenc", 141 | "body": ".then((${1:result}) => {\n\t${2}\n}).catch((${3:err}) => {\n\t${4}\n});", 142 | "description": "Add the .then and .catch methods to handle promises" 143 | }, 144 | 145 | "consoleAssert": { 146 | "prefix": "cas", 147 | "body": "console.assert(${1:expression}, ${2:object});", 148 | "description": "If the specified expression is false, the message is written to the console along with a stack trace" 149 | }, 150 | "consoleClear": { 151 | "prefix": "ccl", 152 | "body": "console.clear();", 153 | "description": "Clears the console" 154 | }, 155 | "consoleCount": { 156 | "prefix": "cco", 157 | "body": "console.count(${1:label});", 158 | "description": "Writes the the number of times that count() has been invoked at the same line and with the same label" 159 | }, 160 | "consoleDebug": { 161 | "prefix": "cdb", 162 | "body": "console.debug(${1:object});", 163 | "description": "Displays a message in the console. Also display a blue right arrow icon along with the logged message in Safari" 164 | }, 165 | "consoleDir": { 166 | "prefix": "cdi", 167 | "body": "console.dir(${1:object});", 168 | "description": "Prints a JavaScript representation of the specified object" 169 | }, 170 | "consoleError": { 171 | "prefix": "cer", 172 | "body": "console.error(${1:object});", 173 | "description": "Displays a message in the console and also includes a stack trace from where the method was called" 174 | }, 175 | "consoleGroup": { 176 | "prefix": "cgr", 177 | "body": "console.group('${1:label}');", 178 | "description": "Groups and indents all following output by an additional level, until console.groupEnd() is called." 179 | }, 180 | "consoleGroupEnd": { 181 | "prefix": "cge", 182 | "body": "console.groupEnd();", 183 | "description": "Closes out the corresponding console.group()." 184 | }, 185 | "consoleLog": { 186 | "prefix": "clg", 187 | "body": "console.log(${1:object});", 188 | "description": "Displays a message in the console" 189 | }, 190 | "consoleLogObject": { 191 | "prefix": "clo", 192 | "body": "console.log('${1:object} :>> ', ${1:object});", 193 | "description": "Displays an object in the console with its name" 194 | }, 195 | "consoleTrace": { 196 | "prefix": "ctr", 197 | "body": "console.trace(${1:object});", 198 | "description": "Prints a stack trace from the point where the method was called" 199 | }, 200 | "consoleWarn": { 201 | "prefix": "cwa", 202 | "body": "console.warn(${1:object});", 203 | "description": "Displays a message in the console but also displays a yellow warning icon along with the logged message" 204 | }, 205 | "consoleInfo": { 206 | "prefix": "cin", 207 | "body": "console.info(${1:object});", 208 | "description": "Displays a message in the console but also displays a blue information icon along with the logged message" 209 | }, 210 | "consoleTable": { 211 | "prefix": "clt", 212 | "body": "console.table(${1:object});", 213 | "description": "Displays tabular data as a table." 214 | }, 215 | "consoleTime": { 216 | "prefix": "cti", 217 | "body": "console.time(${1:object});", 218 | "description": "Sets starting point for execution time measurement" 219 | }, 220 | "consoleTimeEnd": { 221 | "prefix": "cte", 222 | "body": "console.timeEnd(${1:object});", 223 | "description": "Sets end point for execution time measurement" 224 | } 225 | } 226 | --------------------------------------------------------------------------------