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)
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 purejs.org 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
xportsince 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
- 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
- add create() to create new objects from existing ones.
- 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.