0.2.3 • Published 6 years ago

debug-assert v0.2.3

Weekly downloads
13
License
MIT
Repository
github
Last release
6 years ago

What is this.

This is an assertion library, like built in node.js assert module, but:

Installation

npm i debug-assert -S

Usage

Tests

Conditional assertions.

You can use require(debug-assert).conditional object to create conditional assertions which work when you set DEBUG_ASSERT env var to some non empty value.

Tests conditional

Logging passed assertions

  • Set DEBUG_ASSERT_LOG_PASSED env var to some non empty value.
  • Use setLogger() method to set some logger (like winston) and silly level will be used for passed assertions.
  • If no logger is set, logs will be printed by console.log().

Known Issues

  • If assertion consists of many strings, only the first one will be printed.
  • DEBUG_ASSERT env var is checked only at first require call.

License

MIT

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago