rx-meteor-util
v0.0.12
Published
RxJS cursor helpers and collection factories for Meteor.
Readme
rx-meteor-util
RxJS helpers for Meteor cursors and collections. The source of this package is github.com/Omegup/rx-meteor-util.
Install
meteor npm install rx-meteor-util rxjsrxjs 6 is a dependency. The package entry is TypeScript (src/index.ts). Import it from a Meteor app so the Meteor compiler includes it.
Exports
createCollections(types, isServer, Mongo, predefined?) builds a Mongo.Collection for each key in types, plus an RxJS view with find and findIds. On the server, the list key is skipped.
createNames(types) returns the same keys as both names and values.
observeCursor(cursor) and observeCursorIds(cursor) emit the current result array. They call cursor.observe synchronously and cursor.fetch() for the initial value.
mergeFields(fields, restriction) intersects two Mongo field specifiers.
License
ISC
