How to use the can-map.setup function in can-map

To help you get started, we’ve selected a few can-map 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
protoProps = staticProps;
			staticProps = fullName;
		}
		// Assume no static properties were passed. (`CanModel.extend({ ... })`)
		// This is really unusual for a model though, since there's so much configuration.
		if (!protoProps) {
			//!steal-remove-start
			dev.warn("can/model/model.js: CanModel extended without static properties.");
			//!steal-remove-end
			protoProps = staticProps;
		}

		// Create the model store here, in case someone wants to use CanModel without inheriting from it.
		this.store = {};

		CanMap.setup.apply(this, arguments);

		//



		if (!CanModel) {
			return;
		}

		// save everything that's not on base CanModel


		// `List` is just a regular CanModel.List that knows what kind of Model it's hooked up to.
		if(staticProps && staticProps.List) {
			this.List = staticProps.List;
			this.List.Map = this;

can-map

Observable Objects

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis