twada/stringifier — pull request #1 by twada (2014-11-08 14:35:32+00:00)
Title: [WIP] absorb `handlers` argument into `options.handlers`

Absorb `handlers` argument into `options.handlers` to reduce arguments and gain composability.

BREAKING CHANGE: Now `handlers` are moved to `options.handlers`. `handlers` argument is no more.

- changed `stringifier(options, handlers)` to `stringifier(options)`
- changed `stringifier.stringify(val, options, handlers)` to `stringifier.stringify(val, options)`

To migrate, change your code from the following:

```
var stringifier = require('stringifier');
var stringify = stringifier(options, handlers);
console.log(stringify(anyVar));
```

To:

```
var stringifier = require('stringifier');
options.handlers = handlers;
var stringify = stringifier(options);
console.log(stringify(anyVar));
```

And

```
var stringify = require('stringifier').stringify;
console.log(stringify(anyVar, options, handlers));
```

To:

```
var stringify = require('stringifier').stringify;
options.handlers = handlers;
console.log(stringify(anyVar, options));
```

TODO
----------

- [x] Maint test
- [x] Implement
- [ ] README