-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: JavaScript
-
None
-
Environment:Any
I would like the ability to reuse non-trivial JavaScript functions across multiple queries. For example, I would like to do something like "db.require" where x is the contents of a JavaScript library. Future queries would have access to any functions defined the given library. This scope could be maintained at the collection or database level. Either or both would be useful.