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

Native object expansion library

  • 0.3.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

protoblast Protoblast

NPM version Build Status Coverage 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

Documentation

For more information and API documentation, visit the Protoblast homepage.

Getting Started

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 and execute the returned function
require('protoblast')();

var arr = [5,9,3,4,1];

// New native methods, like flashsort, will have been added
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.

// Require protoblast and execute the returned function with `false` as parameter
var Blast = require('protoblast')(false);

var arr = [5,9,3,4,1];

// Native objects will have been left alone, they can be accessed like this:
Blast.Bound.Array.flashsort(arr);
// [1, 3, 4, 5, 9]

Keywords

FAQs

Package last updated on 17 Apr 2017

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