substack/node-browserify — pull request #182 by jhnns (2012-06-27 19:22:12+00:00)
Title: Align module-object to node's module-object

For compatibility reasons the module object provided by browserify should equal node's. I've added some properties that made sense to me and omitted those, that seemed to be deprecated/weird/unused (e.g. the empty children-array).

The module has now these properties:

```javascript
var module_ = {
id : filename,
filename: filename,
exports : {},
loaded : false,
// stores a reference to the module that
// required this module for the first time
parent: null
};
```

In order to add `parent` I have to resolve the full module path of the required module (https://github.com/jhnns/node-browserify/pull/new/master#L2R155), which may have an impact on performance. Unfortunately I couldn't find a quick solution for this.

What do you think?