Atom 
JavaScript Snippets for Install
Go to Atom > Preferences...
then search for JavaScript Snippets in Packages tab.
Restart atom.
Development
$ cd ~/.atom/packages$ git clone https://github.com/zenorocha/atom-javascript-snippets.git$ cd atom-javascript-snippets$ apm install$ apm link
Console
[cd] console.dir
consoledir$1:obj;
[ce] console.error
console;
[ci] console.info
console;
[cl] console.log
console;
[cw] console.warn
console;
[de] debugger
debugger;
DOM
[ae] addEventListener
$1:document
[ac] appendChild
$1:document;
[rc] removeChild
$1:document;
[cel] createElement
$1:document;
[cdf] createDocumentFragment
$1:document;
[ca] classList.add
$1:documentclassList;
[ct] classList.toggle
$1:documentclassList;
[cr] classList.remove
$1:documentclassList;
[gi] getElementById
$1:document;
[gc] getElementsByClassName
$1:document;
[gt] getElementsByTagName
$1:document;
[ga] getAttribute
$1:document;
[sa] setAttribute
$1:document;
[ra] removeAttribute
$1:document;
[ih] innerHTML
$1:documentinnerHTML = '${2:elem}';
[tc] textContent
$1:documenttextContent = '${2:content}';
[qs] querySelector
$1:document;
[qsa] querySelectorAll
$1:document;
Loop
[fe] forEach
$1:myArray
[fi] for in
for $1:prop in $2:obj if $2:obj $0:// body...}
Function
[fn] function
{ $0:// body...}
[afn] anonymous function
{ $0:// body...}
[pr] prototype
$1:ClassNameprototype$2:methodName = { $0:// body...}
[iife] immediately-invoked function expression
{ $0:// body...})window document;
[call] function call
$1:methodName
[apply] function apply
$1:methodName
[ofn] function as a property of an object
$1:functionName: { $3:// body...}
JSON
[jp] JSON.parse
JSON;
[js] JSON.stringify
JSON;
Timer
[si] setInterval
[st] setTimeout
NodeJS
[ase] assert.equal
assert;
[asd] assert.deepEqual
assert;
[asn] assert.notEqual
assert;
[me] module.exports
moduleexports = $1:name;
[pe] process.exit
process;
[re] require
;
BDD
[desc] describe
[ita] it asynchronous
[its] it synchronous
[itp] it pending
;
Misc
[us] use strict
'use strict';
[al] alert
;
[co] confirm
;
[pm] prompt
;
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
Check Release list.
License
MIT License © Zeno Rocha