0.2.3 • Published 7 years ago

debug-assert v0.2.3

Weekly downloads
13
License
MIT
Repository
github
Last release
7 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

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago