jedireza / hapi-react-views

:package: A hapi view engine for React components
MIT License
231 stars 33 forks source link

Investigate removing loop over require cache #3

Closed jedireza closed 9 years ago

jedireza commented 9 years ago

See: https://github.com/jedireza/hapi-react-views/blob/master/index.js#L37-L42

We may be able to simply remove the current required module by key (constant time vs looping over everything). An added benefit would be that we wouldn't need to worry about the file extension used and could remove the regex check also.