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
Weekly downloads
180
decreased by-33.09%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.9.0 (2024-02-15)

  • Make sure String methods don't return object versions of the string
  • Fix Pledge.done() resolving with object versions of primitives
  • Make Blast.require(path) use vm module instead of monkey-patching require
  • Add Cache#clear() method
  • Add Function.postInherit(task), which will execute the task after the class has been inherited
  • Add Blast.parseClassPath(path) method
  • Add WeakValueSet class
  • Add WeakValueSetMap class
  • Make Blast.createObjectId() also available on the server-side
  • Add toISOString method to AbstractDateTime classes
  • Add Blast.didInitialLoad() method
  • Make Blast.executeAfterLoadingCycle() keep did_initial_load variable alone
  • Add String.parseQuoted(input) to parse json-like string values
  • Add the Placeholder and Trail class to the Develry namespace
  • The Pledge class is now a child of Placeholder and no longer an Informer
  • Make Function.create(name, fnc) rename the given function instead of creating a new one using eval
  • Remove eval usage from the methodize & unmethode functions
  • Add new operators to the JavaScript tokenizer
  • Replace Object.hasOwnProperty.call calls with Object.hasOwn
  • Add support for underscores in numbers to the tokenizer
  • Remove some unused string methods
  • Removed special Bun require code

Readme

Source

Protoblast logo Protoblast

Node.js CI (Linux, MacOS, Windows) Codecov Coverage report Known Vulnerabilities

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 15 Feb 2024

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