How to use the can-connect/helpers/.forEach.call function in can-connect

To help you get started, we’ve selected a few can-connect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bitovi-components / bit-c3 / bit-c3 / node_modules / can-connect / src / data / combine-requests / combine-requests.js View on Github external
combineDataPromise.then(function(combinedData){
						// farm out requests
						forEach.call(combinedData, function(combined){

							base.getListData(combined.set).then(function(data){

								if(combined.pendingRequests.length === 1) {
									combined.pendingRequests[0].deferred.resolve(data);
								} else {
									forEach.call(combined.pendingRequests, function(pending){
										pending.deferred.resolve( {data: self.getSubset(pending.set, combined.set, getItems(data) )} );
									});
								}

							});
						});
					});
github bitovi-components / bit-c3 / bit-c3 / node_modules / can-connect / src / data / combine-requests / combine-requests.js View on Github external
base.getListData(combined.set).then(function(data){

								if(combined.pendingRequests.length === 1) {
									combined.pendingRequests[0].deferred.resolve(data);
								} else {
									forEach.call(combined.pendingRequests, function(pending){
										pending.deferred.resolve( {data: self.getSubset(pending.set, combined.set, getItems(data) )} );
									});
								}

							});
						});