Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*
* var todoConnection = connect(["data-url","fall-through-cache"],{
* url: "/services/todos",
* cacheConnection: cacheConnection
* });
* ```
*
*/
var getItems = require("can-connect/helpers/get-items");
var connect = require("can-connect");
var sortedSetJSON = require("can-connect/helpers/sorted-set-json");
var canSet = require("can-set");
require("when/es6-shim/Promise");
var helpers = require("can-connect/helpers/");
var forEach = helpers.forEach;
var map = helpers.map;
//
var indexOf = function(connection, props, items){
var id = connection.id(props);
for(var i = 0; i < items.length; i++) {
if( id == connection.id(items[i]) ) {
return i;
}
}
return -1;
};
var setAdd = function(set, items, item, algebra){
return items.concat([item]);
};