🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert-warning

Assert that doesn't stop execution in production

0.0.2
latest
65

Supply Chain Security

100

Vulnerability

59

Quality

75

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Version published
Weekly downloads
2
-71.43%
Maintainers
1
Weekly downloads
 
Created

I assail my code with assertions and sometimes an assertion is wrong while the code itself is fine.

For these cases I don't want assert to stop execution in production.

Still, an exception is thrown in a setTimeout so that error logging can still be used.

In dev (window.location.hostname==='localhost' or process.env['NODE_ENV'] !== 'production') require('assert-warning') behaves like expected and stops execution.

Check the source code for more information, it's only couples of lines big.

FAQs

Package last updated on 01 Dec 2016

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