jmorrell / backbone.obscura

A read-only proxy of a Backbone.Collection that can be filtered, sorted, and paginated.
http://jmorrell.github.io/backbone.obscura/
MIT License
107 stars 19 forks source link

Verified require function is defined #29

Open liorcode opened 9 years ago

liorcode commented 9 years ago

When trying to detect mode, it checked that model.exports is defined and assumed that means that require is also defined. However, this is not always the case; some libraries other then require also define module.exports. I added a check to verify require is a function.