Skip to content

Instantly share code, notes, and snippets.

View dmnsgn's full-sized avatar

Damien Seguin dmnsgn

View GitHub Profile
@dmnsgn
dmnsgn / .eslintrc.js
Created July 23, 2015 13:31
.eslintrc Google JavaScript Style Guide (eslint v0.24.1)
{
// http://eslint.org/docs/rules/
"env": {
"browser": true, // browser global variables.
"node": false, // Node.js global variables and Node.js-specific rules.
"worker": false, // web workers global variables.
"amd": false, // defines require() and define() as global variables as per the amd spec.
"mocha": false, // adds all of the Mocha testing global variables.
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0.
@dmnsgn
dmnsgn / es6-constructor.js
Created October 6, 2014 16:27
Douglas Crockford's constructor as explained in his NordicJS 2014 talk.
function constructor(spec) {
let {member} = spec,
{other} = other_constructor(spec),
method = function () {
// member, other, method, spec...
};
return Object.freeze({
method,
other