Protoblast
Extend native objects with helpful methods to speed up development,
or leave the native objects alone and use bound methods.
Installation
$ npm install protoblast
Features
- Targeted for node.js & optimal performance, but perfectly usable in the browser
- A way to use all new methods without modifying native prototypes
Todo
- Write documentation (currently a WIP)
- Write more unit tests (coverage is currently around 60%)
- Finish browser unit tests
- ...
Use
You can use Protoblast in 2 ways.
Modify the native prototypes
This is the easiest way to use all the new methods & shims.
Ideal for internal or big projects.
require('protoblast')();
var arr = [5,9,3,4,1];
arr.flashsort();
Use bound functions
You can also get an object that has pre-bound all the new methods,
without modifying anything.
It's more verbose, but should be the way to use Protoblast in redistributable
modules.
var Blast = require('protoblast')(false);
var arr = [5,9,3,4,1];
Blast.Bound.Array.flashsort(arr);