Let's make the API nicer by exposing a factory function instead of forcing the consumer to create an instance using `new`.

So, creating an instance would look like:

```js
var circularBuffer = require('./circular-buffer');
var buffer = circularBuffer(1);
```

Your factory function would be something like:

```js
module.exports = function (capacity) {
  return new CircularBuffer(capacity);
};
```