code: function (notification, trigger) {
      return _.all(trigger, function (triggerValue, key) {
        return !_.has(notification, key) ||
          EJSON.equals(triggerValue, notification[key]);
      });
    }
docs: A notification matches a trigger if all keys that exist in both are equal.  Examples: N:{collection: "C"} matches T:{collection: "C"} (a non-targeted write to a collection matches a non-targeted query) N:{collection: "C", id: "X"} matches T:{collection: "C"} (a targeted write to a collection matches a non-targeted query) N:{collection: "C"} matches T:{collection: "C", id: "X"} (a non-targeted write to a collection matches a targeted query) N:{collection: "C", id: "X"} matches T:{collection: "C", id: "X"} (a targeted write to a collection matches a targeted query targeted at the same document) N:{collection: "C", id: "X"} does not match T:{collection: "C", id: "Y"} (a targeted write to a collection does not match a targeted query targeted at a different document)