Newlyweds Proposing Marriage

    @bonnie/class

    1.0.0 • Public • Published

    an object oriented javascript Inheritance framework

      var Vehicle = Class.Create({
        init: function(wheels) {
          this.wheels = wheels;
        }
      });
    
      var Truck = Vehicle.Extend({
        init: function(hp, wheels) {
          this._super(wheels);
          this.horsepower = hp;
        },
        printInfo: function() {
          console.log('I am a truck and I have ' + this.wheels +
            ' wheels and ' + this.horsepower + ' hp.');
        }
      });
      
      var t = new Truck(350, 4);
      t.printInfo();
    

    Install

    npm i @bonnie/class

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    11.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • bonnie