Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Azer Koçulu committed May 7, 2013
1 parent bb715ae commit 51b473f
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
* [Write Functions As Much As Possible]()
* [Write Functions As Much As Possible](#write-functions-as-much-as-possible)
* [Compose Large Abstractions From Small Modules]()
* [CommonJS Everywhere](#commonjs-everywhere)
* [Require & Export on Top](#require-export-on-top)
* [Avoid `new`, `prototype` and `this`](#avoid-new-prototype-and-this)
* [Prefer Embedding Over Inheritance](#prefer-embedding-over-inheritance)

## Write Functions As Much As Possible.

And define them with `function` keyword:

```js
foo()
bar()

function foo(){}
function bar(){}
```

## CommonJS Everywhere

Modularize your both backend and frontend code in CommonJS. Avoid other module systems like RequireJS.

## Require & Export on Top

```js
foo = require('foo')
bar = require('./bar')

module.exports = {
qux: qux,
corge: corge
}

function qux(){}
function corge(){}
```

## Compose Large Abstractions From Small Modules
## Avoid `new`, `prototype` and `this`

Expand Down Expand Up @@ -33,7 +65,6 @@ smith.parent

kat.parent
// => Joe

```

## Prefer Embedding Over Inheritance
Expand Down

0 comments on commit 51b473f

Please sign in to comment.