{"id":20643636,"url":"https://github.com/extrabacon/atom-turbo-javascript","last_synced_at":"2026-03-12T14:44:39.547Z","repository":{"id":15492840,"uuid":"18226666","full_name":"extrabacon/atom-turbo-javascript","owner":"extrabacon","description":"Commands and snippets for faster Javascript and Typescript with the Atom Editor","archived":false,"fork":false,"pushed_at":"2018-04-23T04:32:02.000Z","size":81,"stargazers_count":99,"open_issues_count":12,"forks_count":43,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-16T02:03:14.770Z","etag":null,"topics":["atom","javascript","snippets"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/extrabacon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-28T21:14:54.000Z","updated_at":"2025-02-04T22:08:03.000Z","dependencies_parsed_at":"2022-08-25T18:21:17.796Z","dependency_job_id":null,"html_url":"https://github.com/extrabacon/atom-turbo-javascript","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/extrabacon/atom-turbo-javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrabacon%2Fatom-turbo-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrabacon%2Fatom-turbo-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrabacon%2Fatom-turbo-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrabacon%2Fatom-turbo-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/extrabacon","download_url":"https://codeload.github.com/extrabacon/atom-turbo-javascript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extrabacon%2Fatom-turbo-javascript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30428718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","javascript","snippets"],"created_at":"2024-11-16T16:13:28.964Z","updated_at":"2026-03-12T14:44:39.505Z","avatar_url":"https://github.com/extrabacon.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# turbo-javascript\nA collection of commands and ES6-ready snippets for optimizing Javascript and Typescript development productivity.\n\n## Commands\n\nUse the following keymaps to speed up your development. You can quickly terminate lines with semicolons or manipulate blocks of code with ease.\n\n#### End Line `CTRL-;`\nTerminates the current line with a semicolon.\n\n#### End Line with a comma `CTRL-,`\nTerminates the current line with a comma (great for object literals).\n\n#### End New Line `CTRL-ENTER`\nTerminates the current line with a colon or semicolon, followed with a new line. A comma is inserted when the cursor is inside an object literal, otherwise a semicolon is inserted.\n\n#### Easy Blocks `CTRL-B`\nCreates a statement block `{ ... }` with the selected text placed inside and properly indented. If the selection is already wrapped with a block, the block is removed and its content is unindented.\n\n## Snippets\n\nSnippets are optimized to be short and easy to remember. Some snippets are \"chainable\" and render differently when preceded by a \".\".\n\nFor example, `.fe` renders a chain-friendly version of the \"forEach\" snippet, while `fe` renders a full code block.\n\n### Declarations\n\n#### `v⇥` var statement\n```js\nvar ${1:name}\n```\n\n#### `v=⇥` var assignment\n```js\nvar ${1:name} = ${2:value}\n```\n\n#### `l⇥` let statement\n```js\nlet ${1:name}\n```\n\n#### `l=⇥` let assignment\n```js\nlet ${1:name} = ${2:value}\n```\n\n#### `co⇥` const statement\n```js\nconst ${1:name}\n```\n\n#### `co=⇥` const assignment\n```js\nconst ${1:name} = ${2:value}\n```\n\n### Flow Control\n\n#### `if⇥` if statement\n```js\nif (${1:condition}) {\n  ${0}\n}\n```\n\n#### `el⇥` else statement\n```js\nelse {\n  ${0}\n}\n```\n\n#### `ife⇥` else statement\n```js\nif (${1:condition}) {\n  ${0}\n} else {\n\n}\n```\n\n#### `ei⇥` else if statement\n```js\nelse if (${1:condition}) {\n  ${0}\n}\n```\n\n#### `fl⇥` for loop\n```js\nfor (let ${1:i} = 0, ${2:len} = ${3:iterable}.length; ${1:i} \u003c ${2:len}; ${1:i}++) {\n  ${0}\n}\n```\n\n#### `fi⇥` for in loop\n```js\nfor (let ${1:key} in ${2:source}) {\n  if (${2:source}.hasOwnProperty(${1:key})) {\n    ${0}\n  }\n}\n```\n\n#### `fo⇥` for of loop (ES6)\n```js\nfor (let ${1:key} of ${2:source}) {\n  ${0}\n}\n```\n\n#### `wl⇥` while loop\n```js\nwhile (${1:condition}) {\n  ${0}\n}\n```\n\n#### `tc⇥` try/catch\n```js\ntry {\n ${0}\n} catch (${1:err}) {\n\n}\n```\n\n#### `tf⇥` try/finally\n```js\ntry {\n ${0}\n} finally {\n\n}\n```\n\n#### `tcf⇥` try/catch/finally\n```js\ntry {\n  ${0}\n} catch (${1:err}) {\n\n} finally {\n\n}\n```\n\n#### `sw⇥` switch case\n```js\nswitch (${1:expr}) {\n  case ${2:value}:\n    return $0;\n  default:\n    return;\n}\n```\n\n### Functions\n\n#### `f⇥` anonymous function\n```js\nfunction (${1:arguments}) {${0}}\n```\n\n#### `fn⇥` named function\n```js\nfunction ${1:name}(${2:arguments}) {\n  ${0}\n}\n```\n\n#### `iife⇥` immediately-invoked function expression (IIFE)\n```js\n(function (${1:arguments}) {\n  ${0}\n})(${2});\n```\n\n#### `fa⇥` function apply\n```js\n${1:fn}.apply(${2:this}, ${3:arguments})\n```\n\n#### `fc⇥` function call\n```js\n${1:fn}.call(${2:this}, ${3:arguments})\n```\n\n#### `fb⇥` function bind\n```js\n${1:fn}.bind(${2:this}, ${3:arguments})\n```\n\n#### `af⇥` arrow function (ES6)\n```js\n(${1:arguments}) =\u003e ${2:statement}\n```\n\n#### `afb⇥` arrow function with body (ES6)\n```js\n(${1:arguments}) =\u003e {\n\\t${0}\n}\n```\n\n#### `gf⇥` generator function (ES6)\n```js\nfunction* (${1:arguments}) {\n  ${0}\n}\n```\n\n#### `gfn⇥` named generator function (ES6)\n```js\nfunction* ${1:name}(${1:arguments}) {\n  ${0}\n}\n```\n\n### Iterables\n\n#### `seq⇥` sequence of 0..n\n```js\n[...Array(${1:length}).keys()]${0}\n```\n\n#### `fe⇥` forEach loop (chainable)\n```js\n${1:iterable}.forEach((${2:item}) =\u003e {\n  ${0}\n});\n```\n\n#### `map⇥` map function (chainable)\n```js\n${1:iterable}.map((${2:item}) =\u003e {\n  ${0}\n});\n```\n\n#### `reduce⇥` reduce function (chainable)\n```js\n${1:iterable}.reduce((${2:previous}, ${3:current}) =\u003e {\n  ${0}\n}${4:, initial});\n```\n\n#### `filter⇥` filter function (chainable)\n```js\n${1:iterable}.filter((${2:item}) =\u003e {\n  ${0}\n});\n```\n\n#### `find⇥` ES6 find function (chainable)\n```js\n${1:iterable}.find((${2:item}) =\u003e {\n  ${0}\n});\n```\n\n### Objects and classes\n\n#### `c⇥` class (ES6)\n```js\nclass ${1:name} {\n  constructor(${2:arguments}) {\n    ${0}\n  }\n}\n```\n\n#### `cex⇥` child class (ES6)\n```js\nclass ${1:name} extends ${2:base} {\n  constructor(${2:arguments}) {\n    super(${2:arguments});\n    ${0}\n  }\n}\n```\n\n#### `ctor` class constructor (ES6)\n```js\nconstructor(${1:arguments}) {\n  super(${1:arguments});${0}\n}\n```\n\n#### `:⇥` key/value pair\nJavascript:\n```js\n${1:key}: ${2:'value'}\n```\nJSON:\n```json\n\"${1:key}\": ${2:\"value\"}\n```\n\n#### `m⇥` method (ES6 syntax)\n```js\n${1:method}(${2:arguments}) {\n  ${0}\n}\n```\n\n#### `get⇥` getter (ES6 syntax)\n```js\nget ${1:property}() {\n  ${0}\n}\n```\n\n#### `set⇥` setter (ES6 syntax)\n```js\nset ${1:property}(${2:value}) {\n  ${0}\n}\n```\n\n#### `gs⇥` getter and setter (ES6 syntax)\n```js\nget ${1:property}() {\n  ${0}\n}\nset ${1:property}(${2:value}) {\n\n}\n```\n\n#### `proto⇥` prototype method (chainable)\n```js\n${1:Class}.prototype.${2:methodName} = function (${3:arguments}) {\n  ${0}\n};\n```\n\n#### `a⇥` Object assign\n```js\nObject.assign(${1:dest}, ${2:source})\n```\n\n#### `ac⇥` Object assign copy (shallow clone)\n```js\nObject.assign({}, ${1:original}, ${2:source})\n```\n\n### Returning values\n\n#### `r⇥` return\n```js\nreturn ${0};\n```\n\n#### `rth⇥` return this\n```js\nreturn this;\n```\n\n#### `rn⇥` return null\n```js\nreturn null;\n```\n\n#### `rt⇥` return true\n```js\nreturn true;\n```\n\n#### `rf⇥` return false\n```js\nreturn false;\n```\n\n#### `r0⇥` return 0\n```js\nreturn 0;\n```\n\n#### `r-1⇥` return -1\n```js\nreturn -1;\n```\n\n#### `rp⇥` return Promise (ES6)\n```js\nreturn new Promise((resolve, reject) =\u003e {\n  ${0}\n});\n```\n\n#### `rc⇥` return complex value (such as JSX components)\n```js\nreturn (\n  ${0}\n);\n```\n\n### Types\n\n#### `S⇥` String\n#### `N⇥` Number\n#### `O⇥` Object\n#### `A⇥` Array\n#### `D⇥` Date\n#### `Rx⇥` RegExp\n\n#### `tof⇥` typeof comparison\n```js\ntypeof ${1:source} === '${2:undefined}'\n```\n\n#### `iof⇥` instanceof comparison\n```js\n${1:source} instanceof ${2:Object}\n```\n\n### Promises\n\n#### `p⇥` new Promise (ES6)\n```js\nnew Promise((resolve, reject) =\u003e {\n  ${0}\n})\n```\n\n#### `then⇥` Promise.then (chainable)\n```js\n${1:promise}.then(${2:value} =\u003e {\n  ${0}\n});\n```\n\n#### `catch⇥` Promise.catch (chainable)\n```js\n${1:promise}.catch(${2:err} =\u003e {\n  ${0}\n});\n```\n\n### ES6 modules\n\n#### `ex⇥` module export\n```js\nexport ${1:member};\n```\n\n#### `exd⇥` module default export\n```js\nexport default ${1:member};\n```\n\n#### `im⇥` module import\n```js\nimport ${1:*} from '${2:module}';\n```\n\n#### `ima⇥` module import as\n```js\nimport ${1:*} as ${2:name} from '${3:module}';\n```\n\n### BDD testing (Mocha, Jasmine, etc.)\n\n#### `desc⇥` describe\n```js\ndescribe('${1:description}', function () {\n  ${0}\n});\n```\n#### `cont⇥` context\n```js\ncontext('${1:description}', function () {\n  ${0}\n});\n```\n#### `it⇥` and `its⇥` synchronous \"it\"\n```js\nit('${1:description}', function () {\n  ${0}\n});\n```\n#### `ita⇥` asynchronous \"it\"\n```js\nit('${1:description}', function (done) {\n  ${0}\n});\n```\n\n#### `bf⇥` before test suite\n```js\nbefore(function () {\n  ${0}\n});\n```\n\n#### `bfe⇥` before each test\n```js\nbeforeEach(function () {\n  ${0}\n});\n```\n\n#### `aft⇥` after test suite\n```js\nafter(function () {\n  ${0}\n});\n```\n\n#### `afe⇥` after each test\n```js\nafterEach(function () {\n  ${0}\n});\n```\n\n### Console\n\n#### `cl⇥` console.log\n```js\nconsole.log(${0});\n```\n\n#### `ce⇥` console.error\n```js\nconsole.error(${0});\n```\n\n#### `cw⇥` console.warn\n```js\nconsole.warn(${0});\n```\n\n### Timers\n\n#### `st⇥` setTimeout\n```js\nsetTimeout(() =\u003e {\n  ${0}\n}, ${1:delay});\n```\n\n#### `si⇥` setInterval\n```js\nsetInterval(() =\u003e {\n  ${0}\n}, ${1:delay});\n```\n\n#### `sim⇥` setImmediate\n```js\nsetImmediate(() =\u003e {\n  ${0}\n});\n```\n\n### DOM specifics\n\n#### `ae⇥` addEventListener\n```js\n${1:document}.addEventListener('${2:event}', ${3:ev} =\u003e {\n  ${0}\n});\n```\n\n#### `gi⇥` getElementById\n```js\n${1:document}.getElementById('${2:id}')\n```\n\n#### `gc⇥` getElementsByClassName\n```js\nArray.from(${1:document}.getElementsByClassName('${2:class}'))\n```\n`Array.from` polyfill required for ES5\n\n#### `gt⇥` getElementsByTagName\n```js\nArray.from(${1:document}.getElementsByTagName('${2:tag}'))\n```\n`Array.from` polyfill required for ES5\n\n#### `qs⇥` querySelector\n```js\n${1:document}.querySelector('${2:selector}')\n```\n\n#### `qsa⇥` querySelectorAll\n```js\nArray.from(${1:document}.querySelectorAll('${2:selector}'))\n```\n`Array.from` polyfill required for ES5\n\n### Node.js specifics\n\n#### `cb⇥` Node.js style callback\n```js\nfunction (err${1:, value}) {${0}}\n```\n\n#### `re⇥` require a module\n```js\nrequire('${1:module}');\n```\n\n#### `em⇥` export member\n```js\nexports.${1:name} = ${2:value};\n```\n\n#### `me⇥` module.exports\n```js\nmodule.exports = ${1:name};\n```\n\n#### `on⇥` attach an event handler (chainable)\n```js\n${1:emitter}.on('${2:event}', (${3:arguments}) =\u003e {\n  ${0}\n});\n```\n\n#### `xm⇥` Express middleware\n```js\nfunction (req, res${1:, next}) {\n  ${0}\n}\n```\n\n#### `xerr⇥` Express error handler\n```js\nfunction (err, req, res, next) {\n  ${0}\n}\n```\n\n### Miscellaneous\n\n#### `us⇥` use strict\n```js\n'use strict';\n```\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014, Nicolas Mercier\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextrabacon%2Fatom-turbo-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextrabacon%2Fatom-turbo-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextrabacon%2Fatom-turbo-javascript/lists"}