Skip to content

wmadden/Panache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Panache

Panache is a Javascript class framework. It provides methods to create classes with public, private and protected members and full inheritance.

Quick Intro

Classes are defined as follows:

const SomeClass = new Class({

  private: {
    propertyName: initial_value,
    methodName: function,
    ...
  },

  protected: {
    propertyName: initial_value,
    methodName: function,
    ...
  },

  public: {
    propertyName: initial_value,
    methodName: function,
    ...
  },

  propertyName: initial_value,
  methodName: function,
  ...

  init: function

});

var sc = new SomeClass(...);

Subclasses are defined similarly:

const ChildClass = new SomeClass.subclass({
  ...
});

Where the definition is in the same form as above.

Root-level members are considered public, and will override members of the same name that are explicitly marked public.

Project Goals

The goals of this project are:

  • To be able to create traditional classes with simple, concise syntax
  • Public, private, protected members
  • Class-based inheritance

Some things it can't do, which may or may not be worthwhile:

  • Mixins
  • Interfaces
  • Abstract classes
  • Event dispatching/handling

About

A(nother) Javascript class library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published