Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

protoblast

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protoblast

Handy functions for several classes' prototype

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
304
increased by22.58%
Maintainers
1
Weekly downloads
 
Created
Source

Protoblast

NPM version Build Status

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')();

// Now new native methods have been added
var arr = [5,9,3,4,1];

arr.flashsort();
// [1, 3, 4, 5, 9]

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);

// Now new native methods have been added
var arr = [5,9,3,4,1];

Blast.Bound.Array.flashsort(arr);
// [1, 3, 4, 5, 9]

Keywords

FAQs

Package last updated on 27 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc