xavierlacot/joli.js — pull request #20 by nicjansma (2012-03-09 20:48:14+00:00)
Title: This looks like a big change via the diff, but there's no change between from the previous ````var joli = { ... }````, it's just wrapped in a new ````joliCreator()```` function now.

...var instead of replacing it.

* For CommonJS usage, a single joli var doesn't work if you want multiple db instances. Subsequent require('joli').connect()s will overwrite previous connection since they're using the same joli var in the module. Instead, a new joliCreator() function is used that will return a new joli object on each call. For parity with Ti.include(), create a module joli var with this function right away. This allows us to have multiple joli connections with CommonJS usage.
* CommonJS usage shouldn't replace the entire exports object, it should add to the object as needed. (https://jira.appcelerator.org/browse/TIMOB-5406)