Skip to content

Instantly share code, notes, and snippets.

@adam8810
Last active November 17, 2016 12:00
Show Gist options
  • Save adam8810/c5b9e06114adcbf4d65308a60227f02d to your computer and use it in GitHub Desktop.
Save adam8810/c5b9e06114adcbf4d65308a60227f02d to your computer and use it in GitHub Desktop.

Style Guide

Type Signatures

 (a -> b) -> b -> a

Composition

 du (T) ( bind  (getSpace ('./outer_space.json'))
        , map   (processSpaces)
        , chain (saveSpaces) );

 R.compose ( extractSpaces
           , getSpaces (2) )(data);

Objects

 {
   colH: [ 'id', 'name', 'favorite' ],
   colD: [
     { id: 1,
       name: 'Person 1',
       favorite: true
     },
     { id: 2,
       name: 'Person 2',
       favorite: true
     },
     { id: 3,
       name: 'Person 3',
       favorite: false
     }
   ],
   tableConf: {}  
 }

Arrays

 const list = [ 1, 2, 3, 4, 5 ];

Imports

 import ThisOldThing from 'oldThings';
 import { this
        , that
        , alsoThis
        , alsoThat } from 'thisAndThat';

Quotes

Prefer ' over ".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment