Skip to content

cherifGsoul/can-define

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

can-define

Add can.compute observable properties, type conversion, and getter/setter logic to your constructor prototypes.

var Person = function(first, last){
		this.first = first;
		this.last = last;
};
define(Person.prototype,{
  first: {
    type: "string"
  },
  last: {
    type: "string"
  },
  fullName: {
    get: function(){
      return this.first+" "+this.last;
    }
  }
});

About

Observable properties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.5%
  • HTML 2.5%