{
  "import": {
    "prefix": "import",
    "body": "import ${2:moduleName} from '${1:module}';$0",
    "description": "Imports entire module statement in ES6 syntax"
  },
  "importNoModuleName": {
    "prefix": "import",
    "body": "import '${1:module}';$0",
    "description": "Imports entire module in ES6 syntax without module name"
  },
  "importDestructing": {
    "prefix": "import",
    "body": "import { $2 } from '${1:module}';$0",
    "description": "Imports only a portion of the module in ES6 syntax"
  },
  "importEverything": {
    "prefix": "import",
    "body": "import * as ${2:alias} from '${1:module}';$0",
    "description": "Imports everything as alias from the module in ES6 syntax"
  },
  "importAs": {
    "prefix": "import",
    "body": "import { ${2:originalName} as ${3:alias} } from '${1:module}';$0",
    "description": "Imports a specific portion of the module by assigning a local alias in ES6 syntax"
  },
  "require": {
    "prefix": "require",
    "body": "require('${1:package}');",
    "description": "Require a package"
  },
  "moduleExports": {
    "prefix": "module.exports",
    "body": "module.exports = {\n\t$0\n};\n",
    "description": "Module exports from Common JS, node syntax at ES6"
  },
  "exportNamedFunction": {
    "prefix": "export",
    "body": "export const ${1:functionName} = (${2:params}) => {\n\t$0\n};\n",
    "description": "Export named function in ES6 syntax"
  },
  "exportDefaultFunction": {
    "prefix": "export default",
    "body": "export default (${1:params}) => {\n\t$0\n};\n",
    "description": "Export default function in ES6 syntax"
  },
  "exportClass": {
    "prefix": "export default",
    "body": "export default class ${1:className} {\n\t$0\n};\n",
    "description": "Export default class in ES6 syntax"
  },
  "exportClassExtends": {
    "prefix": "export default",
    "body": "export default class ${1:className} extends ${2:baseclassName} {\n\t$0\n};\n",
    "description": "Export default class which extends a base one in ES6 syntax"
  },
  "constructor": {
    "prefix": "constructor",
    "body": "constructor(${1:params}) {\n\t${0}\n}",
    "description": "Add default constructor in a class in ES6 syntax"
  },
  "method": {
    "prefix": "met",
    "body": "${1:methodName}(${2:params}) {\n\t${0}\n}",
    "description": "Creates a method inside a class in ES6 syntax"
  },
  "propertyGet": {
    "prefix": "pge",
    "body": "get ${1:propertyName}() {\n\treturn this.${0};\n}",
    "description": "Creates a getter property inside a class in ES6 syntax"
  },
  "propertyset": {
    "prefix": "pse",
    "body": "set ${1:propertyName}(${2:value}) {\n\t${0};\n}",
    "description": "Creates a setter property inside a class in ES6 syntax"
  },
  "forEach": {
    "prefix": "fre",
    "body": "${1:array}.forEach(${2:currentItem} => {\n\t${0}\n});",
    "description": "Creates a forEach statement in ES6 syntax"
  },
  "forOf": {
    "prefix": "fof",
    "body": "for (const ${1:item} of ${2:object}) {\n\t${0}\n}",
    "description": "Iterating over property names of iterable objects"
  },
  "forIn": {
    "prefix": "fin",
    "body": "for (const ${1:item} in ${2:object}) {\n\t${0}\n}",
    "description": "Iterating over property values of iterable objects"
  },
  "anonymousFunction": {
    "prefix": "anfn",
    "body": "(${1:params}) => {\n\t${2}\n}",
    "description": "Creates an anonymous function in ES6 syntax"
  },
  "namedFunction": {
    "prefix": "nfn",
    "body": "const ${1:name} = (${2:params}) => {\n\t${3}\n}",
    "description": "Creates a named function in ES6 syntax"
  },
  "destructingObject": {
    "prefix": "dob",
    "body": "const {${2:propertyName}} = ${1:objectToDestruct};",
    "description": "Creates and assigns a local variable using object destructing"
  },
  "destructingArray": {
    "prefix": "dar",
    "body": "const [${2:propertyName}] = ${1:arrayToDestruct};",
    "description": "Creates and assigns a local variable using array destructing"
  },
  "setInterval": {
    "prefix": "sti",
    "body": "setInterval(() => {\n\t${2}\n}, ${0:intervalInms});",
    "description": "Executes the given function at specified intervals in ES6 syntax"
  },
  "setTimeOut": {
    "prefix": "sto",
    "body": "setTimeout(() => {\n\t${2}\n}, ${1:delayInms});",
    "description": "Executes the given function after the specified delay in ES6 syntax"
  },
  "promise": {
    "prefix": "prom",
    "body": "return new Promise((resolve, reject) => {\n\t${1}\n});",
    "description": "Creates and returns a new Promise in the standard ES6 syntax"
  },
  "thenCatch": {
    "prefix": "thenc",
    "body": ".then((${1:result}) => {\n\t${2}\n}).catch((${3:err}) => {\n\t${4}\n});",
    "description": "Add the .then and .catch methods to handle promises"
  },
  "consoleAssert": {
    "prefix": "cas",
    "body": "console.assert(${1:expression}, ${2:object});",
    "description": "If the specified expression is false, the message is written to the console along with a stack trace"
  },
  "consoleClear": {
    "prefix": "ccl",
    "body": "console.clear();",
    "description": "Clears the console"
  },
  "consoleCount": {
    "prefix": "cco",
    "body": "console.count(${1:label});",
    "description": "Writes the the number of times that count() has been invoked at the same line and with the same label"
  },
  "consoleDir": {
    "prefix": "cdi",
    "body": "console.dir(${1:object});",
    "description": "Prints a JavaScript representation of the specified object"
  },
  "consoleError": {
    "prefix": "cer",
    "body": "console.error(${1:object});",
    "description": "Displays a message in the console and also includes a stack trace from where the method was called"
  },
  "consoleGroup": {
    "prefix": "cgr",
    "body": "console.group(\"${1:label}\");",
    "description": "Groups and indents all following output by an additional level, until console.groupEnd() is called."
  },
  "consoleGroupEnd": {
    "prefix": "cge",
    "body": "console.groupEnd();",
    "description": "Closes out the corresponding console.group()."
  },
  "consoleLog": {
    "prefix": "clg",
    "body": "console.log(${1:object});",
    "description": "Displays a message in the console"
  },
  "consoleLogObject": {
    "prefix": "clo",
    "body": "console.log('${1:object} :', ${1:object});",
    "description": "Displays an object in the console with its name"
  },
  "consoleTrace": {
    "prefix": "ctr",
    "body": "console.trace(${1:object});",
    "description": "Prints a stack trace from the point where the method was called"
  },
  "consoleWarn": {
    "prefix": "cwa",
    "body": "console.warn(${1:object});",
    "description": "Displays a message in the console but also displays a yellow warning icon along with the logged message"
  },
  "consoleInfo": {
    "prefix": "cin",
    "body": "console.info(${1:object});",
    "description": "Displays a message in the console but also displays a blue information icon along with the logged message"
  },
  "consoleTable": {
    "prefix": "clt",
    "body": "console.table(${1:object});",
    "description": "Displays tabular data as a table."
  },
  "consoleTime": {
    "prefix": "cti",
    "body": "console.time(${1:object});",
    "description": "Sets starting point for execution time measurement"
  },
  "consoleTimeEnd": {
    "prefix": "cte",
    "body": "console.timeEnd(${1:object});",
    "description": "Sets end point for execution time measurement"
  },


  
  "var statement": {
    "prefix": "var",
    "body": "var ${0}",
    "description": "var statement"
  },
  "var assignment": {
    "prefix": "v=",
    "body": "var ${1:name} = ${2:value};",
    "description": "var assignment"
  },
  "let statement": {
    "prefix": "let",
    "body": "let ${0}",
    "description": "let statement"
  },
  "let assignment": {
    "prefix": "l=",
    "body": "let ${1:name} = ${2:value};",
    "description": "let assignment"
  },
  "destructuring let assignment": {
    "prefix": "dl=",
    "body": "let {${1:name}} = ${2:value};",
    "description": "destructuring let assignment"
  },
  "const statement": {
    "prefix": "const",
    "body": "const ${0}",
    "description": "const statement"
  },
  "const assignment": {
    "prefix": "co=",
    "body": "const ${1:name} = ${2:value};",
    "description": "const assignment"
  },
  "destructuring const assignment": {
    "prefix": "dco=",
    "body": "const {${1:name}} = ${2:value};",
    "description": "destructuring const assignment"
  },
  // Flow Control
  "if statement": {
    "prefix": "if",
    "body": "if (${1:condition}) {\n\t${0}\n}",
    "description": "if statement"
  },
  "else statement": {
    "prefix": "else",
    "body": "else {\n\t${0}\n}",
    "description": "else statement"
  },
  "if/else statement": {
    "prefix": "ife",
    "body": "if (${1:condition}) {\n\t${0}\n} else {\n\t\n}",
    "description": "if/else statement"
  },
  "else if statement": {
    "prefix": "else if",
    "body": "else if (${1:condition}) {\n\t${0}\n}",
    "description": "else if statement"
  },
  "ternary operator": {
    "prefix": "ter",
    "body": "${1:condition} ? ${2:expression} : ${3:expression};",
    "description": "ternary operator"
  },
  "for loop": {
    "prefix": "for",
    "body": "for (let ${1:i} = 0, ${2:len} = ${3:iterable}.length; ${1:i} < ${2:len}; ${1:i}++) {\n\t${0}\n}",
    "description": "for loop"
  },
  "reverse for loop": {
    "prefix": "rfl",
    "body": "for (let ${1:i} = ${2:iterable}.length - 1; ${1:i} >= 0; ${1:i}--) {\n\t${0}\n}",
    "description": "reverse for loop"
  },
  "for in loop": {
    "prefix": "fi",
    "body": "for (let ${1:key} in ${2:array}) {\n\tif (${2:array}.hasOwnProperty(${1:key})) {\n\t\t${0}\n\t}\n}",
    "description": "for in loop"
  },
  "for of loop (ES6)": {
    "prefix": "fo",
    "body": "for (let ${1:key} of ${2:array}) {\n\t${0}\n}",
    "description": "for of loop (ES6)"
  },
  "while loop": {
    "prefix": "while",
    "body": "while (${1:condition}) {\n\t${0}\n}",
    "description": "while loop"
  },
  "try/catch": {
    "prefix": "try catch",
    "body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n}",
    "description": "try/catch"
  },
  "try/finally": {
    "prefix": "tf",
    "body": "try {\n\t${0}\n} finally {\n\t\n}",
    "description": "try/finally"
  },
  "try/catch/finally": {
    "prefix": "tcf",
    "body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n} finally {\n\t\n}",
    "description": "try/catch/finally"
  },
  "switch case": {
    "prefix": "switch case",
    "body": "switch (${1:expr}) {\n\tcase ${2:value}:\n\t\treturn $0;\n\tdefault:\n\t\treturn;\n}",
    "description": "switch case"
  },
  // Functions
  "anonymous function": {
    "prefix": "function",
    "body": "function (${1:arguments}) {\n\t${0}\n}",
    "description": "anonymous function"
  },
  "named function": {
    "prefix": "fn",
    "body": "function ${1:name}(${2:arguments}) {\n\t${0}\n}",
    "description": "named function"
  },
  "immediately-invoked function expression (IIFE)": {
    "prefix": "iife",
    "body": "((${1:arguments}) => {\n\t${0}\n})(${2});",
    "description": "immediately-invoked function expression (IIFE)"
  },
  "function apply": {
    "prefix": "fa",
    "body": "${1:fn}.apply(${2:this}, ${3:arguments})",
    "description": "function apply"
  },
  "function call": {
    "prefix": "fc",
    "body": "${1:fn}.call(${2:this}, ${3:arguments})",
    "description": "function call"
  },
  "function bind": {
    "prefix": "fb",
    "body": "${1:fn}.bind(${2:this}, ${3:arguments})",
    "description": "function bind"
  },
  "arrow function (ES6)": {
    "prefix": "af",
    "body": "(${1:arguments}) => ${2:statement}",
    "description": "arrow function (ES6)"
  },
  "arrow function with body (ES6)": {
    "prefix": "afb",
    "body": "(${1:arguments}) => {\n\t${0}\n}",
    "description": "arrow function with body (ES6)"
  },
  "generator function (ES6)": {
    "prefix": "gf",
    "body": "function* (${1:arguments}) {\n\t${0}\n}",
    "description": "generator function (ES6)"
  },
  "named generator function (ES6)": {
    "prefix": "gfn",
    "body": "function* ${1:name}(${2:arguments}) {\n\t${0}\n}",
    "description": "named generator function (ES6)"
  },
  // Iterables
  "sequence of 0..n": {
    "prefix": "seq",
    "body": "[...Array(${1:length}).keys()]${0}",
    "description": "sequence of 0..n"
  },
  "forEach loop": {
    "prefix": "fe",
    "body": "${1}.forEach((${2:item}) => {\n\t${0}\n});",
    "description": "forEach loop"
  },
  "map": {
    "prefix": "map",
    "body": "${1}.map((${2:item}) => {\n\t${0}\n});",
    "description": "map"
  },
  "reduce": {
    "prefix": "reduce",
    "body": "${1}.reduce((${2:previous}, ${3:current}) => {\n\t${0}\n}${4:, initial});",
    "description": "reduce"
  },
  "filter": {
    "prefix": "filter",
    "body": "${1}.filter(${2:item} => {\n\t${0}\n});",
    "description": "filter"
  },
  "find": {
    "prefix": "find",
    "body": "${1}.find(${2:item} => {\n\t${0}\n});",
    "description": "find"
  },
  // Objects and Classes
  "object literal": {
    "prefix": "ol",
    "body": "{\n\tkv${0}\n};",
    "description": "object literal"
  },
  "same-line object literal": {
    "prefix": "slol",
    "body": "{ kv${0} };",
    "description": "same-line object literal"
  },
  "key/value pair": {
    "prefix": "kv",
    "body": "${1:key}: ${2:value},",
    "description": "key/value pair"
  },
  "class (ES6)": {
    "prefix": "c",
    "body": "class ${1:name} {\n\tconstructor(${2:arguments}) {\n\t\t${0}\n\t}\n}",
    "description": "class (ES6)"
  },
  "child class (ES6)": {
    "prefix": "cex",
    "body": "class ${1:name} extends ${2:base} {\n\tconstructor(${3:arguments}) {\n\t\tsuper(${3:arguments});\n\t\t${0}\n\t}\n}",
    "description": "child class (ES6)"
  },
  "class constructor (ES6)": {
    "prefix": "ctor",
    "body": "constructor(${1:arguments}) {\n\tsuper(${1:arguments});${0}\n}",
    "description": "class constructor (ES6)"
  },
  "method (ES6 syntax)": {
    "prefix": "m",
    "body": "${1:method}(${2:arguments}) {\n\t${0}\n}",
    "description": "method (ES6 syntax)"
  },
  "getter (ES6 syntax)": {
    "prefix": "get",
    "body": "get ${1:property}() {\n\t${0}\n}",
    "description": "getter (ES6 syntax)"
  },
  "setter (ES6 syntax)": {
    "prefix": "set",
    "body": "set ${1:property}(${2:value}) {\n\t${0}\n}",
    "description": "setter (ES6 syntax)"
  },
  "getter and setter (ES6 syntax)": {
    "prefix": "gs",
    "body": "get ${1:property}() {\n\t${0}\n}\nset ${1:property}(${2:value}) {\n\t\n}",
    "description": "getter and setter (ES6 syntax)"
  },
  "prototypal constructor": {
    "prefix": "pctor",
    "body": "var ${1:Class} = function(${2:arguments}) {\n\t${0}\n};",
    "description": "prototypal constructor"
  },
  "prototype method": {
    "prefix": "proto",
    "body": "${1:Class}.prototype.${2:method} = function(${3:arguments}) {\n\t${0}\n};",
    "description": "prototype method"
  },
  "Object.assign": {
    "prefix": "oa",
    "body": "Object.assign(${1:dest}, ${2:source})",
    "description": "Object.assign"
  },
  "Object.assign copy (shallow clone)": {
    "prefix": "oc",
    "body": "Object.assign({}, ${1:original}, ${2:source})",
    "description": "Object.assign copy (shallow clone)"
  },
  // Returning values
  "return": {
    "prefix": "r",
    "body": "return ${0};",
    "description": "return"
  },
  "return Promise (ES6)": {
    "prefix": "rp",
    "body": "return new Promise((resolve, reject) => {\n\t${0}\n});",
    "description": "return Promise (ES6)"
  },
  "return complex value (such as JSX components)": {
    "prefix": "rc",
    "body": "return (\n\t${0}\n);",
    "description": "return complex value (such as JSX components)"
  },
  // Types
  "typeof": {
    "prefix": "tof",
    "body": "typeof ${1:source} === '${2:undefined}'",
    "description": "typeof"
  },
  "instanceof": {
    "prefix": "iof",
    "body": "${1:source} instanceof ${2:Object}",
    "description": "instanceof"
  },
  // Promises
  "Promise (ES6)": {
    "prefix": "pr",
    "body": "new Promise((resolve, reject) => {\n\t${0}\n})",
    "description": "Promise (ES6)"
  },
  "Promise.then": {
    "prefix": "then",
    "body": "${1:promise}.then((${2:value}) => {\n\t${0}\n})",
    "description": "Promise.then"
  },
  "Promise.catch": {
    "prefix": "catch",
    "body": "${1:promise}.catch((${2:err}) => {\n\t${0}\n})",
    "description": "Promise.catch"
  },
  // ES6 Modules
  "export (ES6)": {
    "prefix": "ex",
    "body": "export ${1:member};",
    "description": "export (ES6)"
  },
  "export default (ES6)": {
    "prefix": "exd",
    "body": "export default ${1:member};",
    "description": "export default (ES6)"
  },
  "import module (ES6)": {
    "prefix": "im",
    "body": "import ${1:*} from '${2:module}';",
    "description": "import module (ES6)"
  },
  "import module as (ES6)": {
    "prefix": "ima",
    "body": "import ${1:*} as ${2:name} from '${3:module}';",
    "description": "import module as (ES6)"
  },
  // Node.js
  "Node.js style callback": {
    "prefix": "cb",
    "body": "(err, ${1:value}) => {${0}}",
    "description": "Node.js style callback"
  },
  "require": {
    "prefix": "re",
    "body": "require('${1:module}');",
    "description": "require"
  },
  "require local": {
    "prefix": "rel",
    "body": "require('./${1:module}');",
    "description": "require local"
  },
  "require assignment": {
    "prefix": "req",
    "body": "const ${1:module} = require('${1:module}');",
    "description": "require assignment"
  },
  "require assignment local": {
    "prefix": "reql",
    "body": "const ${1:module} = require('./${1:module}');",
    "description": "require assignment local"
  },
  "destructuring require assignment": {
    "prefix": "dreq",
    "body": "const {${1:module}} = require('${1:module}');",
    "description": "destructuring require assignment"
  },
  "destructuring require assignment local": {
    "prefix": "dreql",
    "body": "const {${1:module}} = require('./${1:module}');",
    "description": "destructuring require assignment local"
  },
  "exports.member": {
    "prefix": "em",
    "body": "exports.${1:member} = ${2:value};",
    "description": "exports.member"
  },
  "module.exports": {
    "prefix": "me",
    "body": "module.exports = ${1:name};",
    "description": "module.exports"
  },
  "module exports object": {
    "prefix": "meo",
    "body": "module.exports = {\n\t${1:member}\n};",
    "description": "module exports object"
  },
  "event handler": {
    "prefix": "on",
    "body": "${1:emitter}.on('${2:event}', (${3:arguments}) => {\n\t${0}\n});",
    "description": "event handler"
  },
  // BDD Testing (Mocha, Jasmine, etc.)
  "describe": {
    "prefix": "desc",
    "body": "describe('${1:description}', () => {\n\t${0}\n});",
    "description": "describe"
  },
  "context": {
    "prefix": "cont",
    "body": "context('${1:description}', () => {\n\t${0}\n});",
    "description": "context"
  },
  "it": {
    "prefix": "it",
    "body": "it('${1:description}', () => {\n\t${0}\n});",
    "description": "it"
  },
  "it synchronous": {
    "prefix": "its",
    "body": "it('${1:description}', () => {\n\t${0}\n});",
    "description": "it synchronous"
  },
  "it asynchronous": {
    "prefix": "ita",
    "body": "it('${1:description}', (done) => {\n\t${0}\n\tdone();\n});",
    "description": "it asynchronous"
  },
  "before test suite": {
    "prefix": "bf",
    "body": "before(() => {\n\t${0}\n});",
    "description": "before test suite"
  },
  "before each test": {
    "prefix": "bfe",
    "body": "beforeEach(() => {\n\t${0}\n});",
    "description": "before each test"
  },
  "after test suite": {
    "prefix": "aft",
    "body": "after(() => {\n\t${0}\n});",
    "description": "after test suite"
  },
  "after each test": {
    "prefix": "afe",
    "body": "afterEach(() => {\n\t${0}\n});",
    "description": "after each test"
  },
  // Console
  "console.log": {
    "prefix": "console.log",
    "body": "console.log(${0});",
    "description": "console.log"
  },
  "console.error": {
    "prefix": "ce",
    "body": "console.error(${0});",
    "description": "console.error"
  },
  "console.warn": {
    "prefix": "cw",
    "body": "console.warn(${0});",
    "description": "console.warn"
  },
  "console.log labeled": {
    "prefix": "cll",
    "body": "console.log('${0}', ${0});",
    "description": "console.log labeled"
  },
  "console.error labeled": {
    "prefix": "cel",
    "body": "console.error('${0}', ${0});",
    "description": "console.error labeled"
  },
  "console.warn labeled": {
    "prefix": "cwl",
    "body": "console.warn('${0}', ${0});",
    "description": "console.warn labeled"
  },
  // Timers
  "setTimeout": {
    "prefix": "setTimeout",
    "body": "setTimeout(() => {\n\t${0}\n}, ${1:delay});",
    "description": "setTimeout"
  },
  "setInterval": {
    "prefix": "setInterval",
    "body": "setInterval(() => {\n\t${0}\n}, ${1:delay});",
    "description": "setInterval"
  },
  "setImmediate": {
    "prefix": "setImmediate",
    "body": "setImmediate(() => {\n\t${0}\n});",
    "description": "setImmediate"
  },
  "process nextTick": {
    "prefix": "nt",
    "body": "process.nextTick(() => {\n\t${0}\n});",
    "description": "process nextTick"
  },
  // Miscellaneous
  "insert 'use strict' statement": {
    "prefix": "use strict",
    "body": "'use strict';",
    "description": "insert 'use strict' statement"
  }
}