Skip to content

Meteor package to call Meteor Methods synchronously with stubs returning and throwing exceptions without having to specify options every time

Notifications You must be signed in to change notification settings

grovelabs/meteor-call-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grove:call-sync

Usage

You use Meteor.callSync and Meteor.applySync exactly as their counterparts, Meteor.call and Meteor.apply.

Note - this package requires using the 1.2-rc.16 Meteor release.

How it works

This package makes use of two undocumented options for calling Meteor Methods. The first is the returnStubValue which will cause the return value from a Meteor method stub to actually be returned instead of undefined. The second is the recently created throwStubExceptions option. With this option, Meteor method stubs will throw exceptions instead of logging them to the console. If an exception is thrown, the method will not be run on the server. Meteor.callSync and Meteor.applySync sets these options to true so you don't have to remember to.

About

Meteor package to call Meteor Methods synchronously with stubs returning and throwing exceptions without having to specify options every time

Resources

Stars

Watchers

Forks

Packages

No packages published