The missing API for Javascript.

{modular design}

Purejs supports modular driven design.

You can use Purejs as an AMD module or a Nodejs/CommonJS module. Of course you can also use it as a typical browser script that exports a global namespace by the name of 'pure'.

{origins}

Purejs started out as an API to help create constructors and manage their prototype chain.

It never felt right trying to graft a classical design pattern on a prototypal language, so Purejs started out as an API to help create constructors and manage their prototype chain. Unlike Base.js', Prototype.js' and John Resig's classical approaches, Purejs adheres to the prototypal nature of the language without introducing new ideas, allowing a greater integration with builtin constructors.

{goals}

Purejs is driven by goals oriented to the language and future developers.

  1. Help developers to think in terms of prototypes
  2. Provide a useable interface to work with Javascript's prototype system without introducing classical ideas
  3. Must work with both the constructor and functional design patterns
  4. Must maintain prototype chain and constructor history
  5. Must not add any overhead or use ill advised techniques
  6. Minimal, comprehensible syntax