kevinohara80 / nforce

nforce is a node.js salesforce REST API wrapper for force.com, database.com, and salesforce.com
MIT License
474 stars 167 forks source link

Add possibility to chain plugin's method declarations #98

Closed michacom closed 9 years ago

michacom commented 9 years ago

Now:

    var plugin = nforce.plugin(pluginName);

    plugin.fn('a', function(args, callback) {});
    plugin.fn('b', function(args, callback) {});
    plugin.fn('c', function(args, callback) {});

May be:

    nforce.plugin(pluginName).
        fn('a', function(args, callback) {}).
        fn('b', function(args, callback) {}).
        fn('c', function(args, callback) {}).
        fn('d', function(args, callback) {});

IMHO, member function should return this instead of nothing.

Thanks