How to use the can-list.prototype function in can-list

To help you get started, we’ve selected a few can-list 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 canjs / can-connect / can / model / model.js View on Github external
setup: function (params) {
		// If there was a plain object passed to the List constructor,
		// we use those as parameters for an initial findAll.
		if (isPlainObject(params) && !Array.isArray(params)) {
			this.replace(canReflect.isPromise(params) ? params : this.constructor.Map.findAll(params));
		} else {
			// Otherwise, set up the list like normal.
			CanList.prototype.setup.apply(this, arguments);
		this._init = 1;
		this.bind('destroyed', this._destroyed.bind(this));
		delete this._init;
	_destroyed: function (ev, attr) {


Observable lists

Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis