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

@agoric/assert

Package Overview
Dependencies
Maintainers
5
Versions
2115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agoric/assert

Assert expression support that protects sensitive data

  • 0.3.15-dev-8002489.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

assert

An assertion library that keeps sensitive data outside of the Error.

Throw (using provided error message) if expression is false. Assert that expr is truthy, with an optional details to describe the assertion. It is a tagged template literal like

assert(expr, details`....`);

If expr is falsy, then the template contents are reported to the console and also in a thrown error.

The literal portions of the template are assumed non-sensitive, as are the typeof types of the substitution values. These are assembled into the thrown error message. The actual contents of the substitution values are assumed sensitive, to be revealed to the console only. We assume only the virtual platform's owner can read what is written to the console, where the owner is in a privileged position over computation running on that platform.

The optional details can be a string for backwards compatibility with the nodejs assertion library.

Keywords

FAQs

Package last updated on 02 Dec 2021

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