Socket
Socket
Sign inDemoInstall

protoblast

Package Overview
Dependencies
0
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

protoblast


Version published
Maintainers
1
Created

Changelog

Source

0.2.1 (2016-06-06)

  • Add queue_drop option to FunctionQueue, which will limit amount of items in a function queue by dropping older added tasks
  • Add Array.likeArray to determine if an object is like an array
  • Object.dissect will only add numeric array properties to the result
  • Added Blast.setTimeout and Blast.setSchedule for more precise timers
  • Add String.randomMac to generate a random mac address
  • Add Function.getNamespace to get/create a namespace object
  • Blast.DEBUG is now true if there is a DEBUG environment variable

Readme

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.

Getting started

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

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

Last updated on 06 Jun 2016

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc