Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 1.26 KB

Template.md

File metadata and controls

69 lines (46 loc) · 1.26 KB

Templates

These are the live templates I use in WebStorm

Requires

rq_ is the short form for require.

Command Description
rq let <tab> = require(<tab>)
rq__ let _ = require('lodash')
rq_qs let qs = require('qs')
rq_fs let fs = require('fs')

Functions

fn is the short form for function. So,

Command Description
nfn Named function
afn Anonymous function
rfn Express request function
sfn Static function

nfn gives

function <Tab> (<Tab>) {
  <Tab>
}

Lodash

Lodash is a modern JavaScript utility library delivering modularity, performance & extras.

_ is the short form. So,

Command Description
_e _.each()
_m _.map()
_r _.reduce()

Express

e stands for express

Express is Fast, unopinionated, minimalist web framework for Node.js

Command Description
e_route express router boilerplate

Trivials

Command Description
clog console.log(<TAB>);
us; 'use strict';

Testing

Command Description
rq_desc describe template
rq_expect let expect = require('expect')