visionmedia / express-resource

Resourceful routing for Express
1.41k stars 140 forks source link

What's the opts argument in resource() for? #63

Closed bow-fujita closed 12 years ago

bow-fujita commented 12 years ago

Hi,

I looked thru express-resource/index.js and wondered what happens if I pass an object as third argument in express.HTTPServer.prototype.resource() function.

Each property in opts is copied to options, which is a local variable, at line 259 in index.js. However, neither opts nor options are passed to the Resource object. The opts argument seems useless. The comment above resource() doesn't mention the opts at all. Is this reserved for future functionality?

Thank you, Bow

bow-fujita commented 12 years ago

Sorry about my misunderstanding. I see that each props in opts are applied to actions through options. It makes sense.

Bow