Skip to content

Instantly share code, notes, and snippets.

@gentunian
Created July 14, 2015 17:35
Show Gist options
  • Save gentunian/891d902b6969f6758ab1 to your computer and use it in GitHub Desktop.
Save gentunian/891d902b6969f6758ab1 to your computer and use it in GitHub Desktop.
added
< var t = new Mongo.Collection(null);
> undefined
< t.insert({ble: 1})
> "EvZXebTK3HdhJPNCY"
< t.insert({ble: 2})
> "GfeBhBptZxYruApqo"
< t.insert({ble: 4})
> "gmg8kPEWzyiC2hBys"
< var c = t.find();
> undefined
< c.observe({added: function (d){console.log(d);}})
> VM105317:2 Object {ble: 1, _id: "EvZXebTK3HdhJPNCY"}
> VM105317:2 Object {ble: 2, _id: "GfeBhBptZxYruApqo"}
> VM105317:2 Object {ble: 4, _id: "gmg8kPEWzyiC2hBys"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment