random-throwdeprecated

randomly throw an error

Usage no npm install needed!

<script type="module">
  import randomThrow from 'https://cdn.skypack.dev/random-throw';
</script>

README

random throw

Randomly throw an error

Usage

$ npm install --save random-throw
const randomThrow = require('random-throw')

// call randomThrow at some point preferably in a regularly used function

app.post('/auth', (req, res) => {
  randomThrow()

  // do auth stuff
  checkPassword()
    .then(login())
    .catch(sessionError)
})