Top "Chaining" questions

Chaining is an object-oriented programming technique where methods return the object on which they were called so that another method may be called on the same object, thus forming a method chain.

Javascript inheritance: call super-constructor or use prototype chain?

Quite recently I read about JavaScript call usage in MDC https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/…

javascript inheritance call chaining prototype-programming
Java 8 apply function to all elements of Stream without breaking stream chain

Is there a way in Java to apply a function to all the elements of a Stream without breaking the …

java java-8 java-stream chaining
How to achieve method chaining in Java?

I want to achieve method chaining in Java. How can I achieve it? Also let me know when to use …

java methods chaining
Chain promises with AngularJS

I have a service called paymentStrategy that get injected in my controller. $scope.buy = function() { paymentStrategy.buy() .then(function(response) { } } …

javascript angularjs promise chaining
Search on descendants of an element

With protractor whats the best way to select child elements? Say we have the layout below... <div id='parent_1…

element parent-child protractor chaining
How do I chain or queue custom functions using JQuery?

I have multiple functions the do different animations to different parts of the HTML. I would like to chain or …

jquery animation queue chaining
Angular2 - Cannot read property 'subscribe' of undefined in nested call

I have looked at a number of resources including this, this and this, but I have not been able to …

angular asynchronous callback observable chaining
How does basic object/function chaining work in javascript?

I'm trying to get the principles of doing jQuery-style function chaining straight in my head. By this I mean: var …

javascript methods chaining method-chaining
How do I sequentially chain promises with angularjs $q?

In the promise library Q, you can do the following to sequentially chain promises: var items = ['one', 'two', 'three']; var …

angularjs q chaining sequential angular-promise
How do you use underscore's chain method to return the first item in a multidimensional array?

Say I have an array of arrays, and I want to return the first element of each array within the …

javascript underscore.js chaining chain