Socket
Socket
Sign inDemoInstall

minimalistic-assert

Package Overview
Dependencies
0
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

minimalistic-assert

minimalistic-assert ===

    1.0.1latest
    GitHub
    npm

Version published
Maintainers
2
Weekly downloads
17,603,936
increased by2.98%

Weekly downloads

Package description

What is minimalistic-assert?

The minimalistic-assert npm package is a minimal assertion library that provides a simple way to assert truths in JavaScript code. It is designed to be small and straightforward, offering basic assertion functionality without any frills.

What are minimalistic-assert's main functionalities?

Assert truthiness

This feature allows you to assert that a value is truthy. If the value is not truthy, it throws an AssertionError with the provided message.

var assert = require('minimalistic-assert');
assert(true, 'This will not throw');
assert(false, 'This will throw an AssertionError');

Assert equality

This feature allows you to assert that two values are equal using the '==' operator. If they are not equal, it throws an AssertionError with the provided message.

var assert = require('minimalistic-assert');
assert.equal(1, 1, 'This will not throw');
assert.equal(1, 2, 'This will throw an AssertionError');

Assert strict equality

This feature allows you to assert that two values are strictly equal using the '===' operator. If they are not strictly equal, it throws an AssertionError with the provided message.

var assert = require('minimalistic-assert');
assert.strictEqual(1, 1, 'This will not throw');
assert.strictEqual(1, '1', 'This will throw an AssertionError');

Other packages similar to minimalistic-assert

Readme

Source

minimalistic-assert

very minimalistic assert module.

FAQs

Last updated on 11 Apr 2018

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the 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