Socket
Socket
Sign inDemoInstall

protoblast

Package Overview
Dependencies
1
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    protoblast

Native object expansion library


Version published
Maintainers
1
Install size
714 kB
Created

Changelog

Source

0.7.1 (2020-07-11)

  • Automatically create the prototypal wrapper methods for the function inheritance
  • Function#setProperty now accepts a single object to set multiple properties
  • Add Stream.Delayed() class
  • Add Stream.Combined() class
  • Fix browser-side Crypto.randomHex() returning faulty data
  • Supplying @ as a namespace will put it in the root
  • Add server-side FormData class
  • When reporting Pledge progress, the duration of each interval is also logged
  • Make the reset_on_call option of Function.throttle actually work
  • Pledge subclasses will return a regular Pledge on .then()
  • Add Pledge.Timeout class
  • Add String#splitCharacters() for getting an array of the string's characters
  • Add the loopOverArgument() decorator, which will loop over the given argument if it's an array
  • Add the empty event to FunctionQueue
  • Add the RURL#extension property to get/set the extension of the pathname
  • RURL#pathname will now no longer be empty when the protocol requires a slash
  • Add a custom Error class
  • Add Function.isNativeClass() to detect functions made with native class syntax
  • Added Symbol.hasInstance trap to the namespace functions
  • Use setImmediate for rejecting Pledges to prevent uncaught warnings
  • Fix Blast.versions entries not being set correctly

Readme

Source

Protoblast logo Protoblast

Mac/Linux Build Status Windows Build status Codecov Coverage report Known Vulnerabilities Dependency Status

Extend native objects with helpful methods to speed up development
Coded with ❤️ by Eleven Ways.

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 str = 'Get what we want';

// New native methods, like after, will have been added
str.after('what');
// ' we want'

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 str = 'Get what we want';

// Native objects will have been left alone, they can be accessed like this:
Blast.Bound.String.after(str, 'what');
// ' we want'

Authors

Protoblast is developed at Eleven Ways, a team of IAAP Certified Accessibility Specialists.

Keywords

FAQs

Last updated on 11 Jul 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc