npm.io
0.2.6 • Published 11 years ago

higher-object

Licence
MIT
Version
0.2.6
Deps
1
Vulns
0
Weekly
0

Higher Object

A little library to force good object standards.

An object is considered a higher object of it meats the following criteria:

  • It is a JS 'class' that starts with an uppercase letter
  • It has a static ClassName.isClassName method for checking if something is a class
  • It has a static ClassName.fromJS
  • It has an instance valueOf method
  • It has an instance toString method
  • It has an instance toJS method
  • It has an instance toJSON method that returns the same as the toJS method
  • It has an instance equals method

Keywords