edankwan/penis.js — pull request #5 by jesseditson (2014-09-02 23:49:20+00:00)
Title: Setters, memory, unit tests

Adds a few features to help this be production ready.

I didn't pay too much attention to the coding style, didn't see an .editorconfig file but if you want I can try to clean it up (move to 4 spaces everywhere, etc).

Things this PR adds:

- setters so you can set `.balls` and `.head` and it will set `B` and `D`
- `reset` function on `penis`
- unit tests for all functions

now you can:

```javascript
var penis = require('penis');

D = 'dick';

penis.balls = '1';
penis.head = 1;

B==D; // true
B===D; // false

penis.reset();

D == 'dick' // true;
```

All existing functionality remains and how has test coverage.

Cheers!

![true dicktective](http://s.mlkshk.com/r/XQ9H)