As configured in my dotfiles.
start new:
tmux
start new with session name:
module.exports = { | |
"extends": "standard", | |
"plugins": [ | |
"standard", | |
"promise", | |
"react" | |
], | |
"env": { | |
"browser": true, | |
"node": true, |
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"isolatedModules": false, | |
"jsx": "react", | |
"experimentalDecorators": true, | |
"emitDecoratorMetadata": true, | |
"declaration": true, |
'.source.js': | |
'Preamble configure': | |
'prefix': 'configure' | |
'body': """ | |
configure({ | |
$1: $2, | |
}); | |
""" | |
'Preamble describe': | |
'prefix': 'describe' |
/** | |
* Creates a new object that can be used as a protype for a ctor. | |
* @param api object The object whose own properties are to be copied to | |
* the new prototype object. | |
* @param ctr function The constructor function which will be set as the | |
* value of the new prototype's contructor property. | |
* @returns an object that can be uses as a protytpe. | |
*/ | |
function createPrototype(api, ctr){ | |
var ownProps = Object.getOwnPropertyNames(api), |
'Preamble describe': | |
'prefix': 'describe' | |
'body': """ | |
describe('$1', function(){ | |
$2 | |
}); | |
""" | |
'Preamble it': | |
'prefix': 'it' | |
'body': """ |
/* Date Validation by Jeffrey Schwartz */ | |
(function(w){ | |
'use strict'; | |
var dv; | |
//define the project module's name space | |
w.ejr = w.ejr || {}; | |
//define this module's name space | |
dv = w.ejr.dateValidation = {}; | |
dv.isYearValid = function isYearValid(y){ | |
return typeof(y) === 'number'; |
/* | |
* Emulates classical inheritance and results in a | |
* prototype chain (nested prototypes) of baseclasses. | |
*/ | |
(function(){ | |
/* | |
* Extend childObj from parentObj and apply childPrototype to the childObj. | |
* @param {Objectl} childObj The child object. Required. | |
* @param {Objectl} parentObj The parent object. Required. |
(function(){ | |
"use strict"; | |
/** | |
* Creating a partial the hard way. | |
*/ | |
(function(){ | |
function add(x){ | |
return function(y){ |
(function(){ | |
"use strict"; | |
/** | |
* A factory for creating curry functions that | |
* are tied to the arrity of the function f. | |
*/ | |
function makeArrityBasedCurry(n) { | |
var curry = function(f){ | |
var args = [].slice.call(arguments, 1); |
As configured in my dotfiles.
start new:
tmux
start new with session name: