At this package we will publish mini-mongo functionality extensions
meteor add ostrio:minimongo-extensions
Currently only one extension is available:
doc
{Object|[Object]}callback
{Function}error
{Meteor.Error}result
{String|[String]} - New document ID or array of new documents IDs
After installing this package every collection.insert()
will accept array of objects [Object], each object in array will be inserted separately by its own, in accordance to db.collection.insert MongoDB docs.
If doc
is array of objects, second parameter of the callback is array of new documents IDs. For more see collection.insert(doc, [callback])