immediate-error 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Immediate-error
2
2
  ```javascript
3
3
  const immediateError = require('immediate-error')
4
- immediateError()
4
+ immediateError('Aaaaah') // this will throw an error with the message Aaaaah
5
5
  ```
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
- module.exports = function immediateError() {
2
- const fox = require('fox')
1
+ module.exports = function immediateError(message = 'You asked for it') {
2
+ throw new Error(message)
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "immediate-error",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "description": "Causes an error when run.",
5
5
  "main": "index.js",
6
6
  "scripts": {