Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
substack
· 15y ago · 0 comments
Actually in node at least modules can export functions directly, just assign a function to `module.exports` and when you require() that module you'll get a function back. Plus you can add attributes to that function since functions are also objects.
Comments
[–]
olegp
15y ago
That's cool, I had overlooked that. I guess the point is that there's no key value store for modules, whereas for packages there's npm.