Skip to content
The pure JavaScript API for constructors, mixins and type testing.
JavaScript CSS CoffeeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Pure.js is an API to help create constructors and manage their prototype chain. Pure.js adheres to JavaScript's prototypal nature without introducing new ideas, allowing a greater integration with builtin constructors.


npm install purejs

Or using bower

bower install purejs


To use the component you will have to bundle the component using a tool like Browserify. For example:


var pure = require('purejs')
console.log(typeof pure)

command line:

browserify -t debowerify ./public/modules/app.js > ./public/app.max.js


If you want to run the tests then you will need to do the following:

cd purejs
npm install
npm test


See for the API reference and more info.



  • Update constructor-kit to version 0.1.0


  • Refactor the build process to use Gulp
  • Added Coffeelint to the build process
  • Set main file in bower.json to be NPM module pure.js
  • Require bower consumers to use a tool like Browserify to bundle the module


  • Port source code to be CoffeeScript based
  • Replace constructor.create with constructor-kit function; API is identical to constructor-kit
  • Revamp the build process to use browserify and minify
  • Support UMD module definition
  • Deprecate the following features on constructors: copy constructors, init(), calling constructors without new, setting a name on a constructor
  • Register as a bower component and NPM module


  • Remove dependency on xport since it's deprecated.
  • Clean up the dev dependencies, making it much easier to test.
  • Create make files for minifying and testing.
  • Change the exported name in browsers to Pure instead of PURE.
  • isArray() no longer tests for Array-like objects. Objects are only considered an Array if they have Array in their prototype chain.
  • isObject() now uses the following test: o === Object(o).
  • add isPrimitive() to test for string, number and boolean literals.
  • add create() to create new objects from existing ones.
  • constructor.create: - remove the getName() method on constructors created via Pure.constructor.create(). - In a previous version the name argument was not being used, now it's being used by overriding the created constructor's toString() method. - The name argument no longer defaults to UnnamedConstructor. - If no name argument is given then the created constructor's toString() method is not overridden.
  • Change the unit tests to use Jasmine.
You can’t perform that action at this time.