#Javascript snippets for sublimetext2
A bunch of snippets for lightning-like javascripting
Globals and word-based
- w → window
- d → document
- a → arguments
- l → location
- q → querySelectorAll('')
Functions
- f → function () {}
- sif → Self invoked function ;(function () {}());
- sifs → Same, but strict thing ;(function () {'use strict';}());
Loops
- for → loop with predefined index and array
Logging (can be used from command palette to wrap javascript expression)
- cl → console.log();
- cw → console.warn();
- ci → console.info();
- ct → console.timeStamp('');