Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fault

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fault - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

18

index.js

@@ -5,13 +5,15 @@ 'use strict';

module.exports = exports = create(Error);
var fault = create(Error);
exports.eval = create(EvalError);
exports.range = create(RangeError);
exports.reference = create(ReferenceError);
exports.syntax = create(SyntaxError);
exports.type = create(TypeError);
exports.uri = create(URIError);
module.exports = fault;
exports.create = create;
fault.eval = create(EvalError);
fault.range = create(RangeError);
fault.reference = create(ReferenceError);
fault.syntax = create(SyntaxError);
fault.type = create(TypeError);
fault.uri = create(URIError);
fault.create = create;
/* Create a new `EConstructor`, with the formatted

@@ -18,0 +20,0 @@ * `format` as a first argument. */

{
"name": "fault",
"version": "1.0.0",
"version": "1.0.1",
"description": "Functional errors with formatted output",

@@ -28,12 +28,12 @@ "license": "MIT",

"devDependencies": {
"browserify": "^13.0.0",
"browserify": "^14.0.0",
"esmangle": "^1.0.0",
"nyc": "^8.3.1",
"remark-cli": "^2.0.0",
"remark-preset-wooorm": "^1.0.0",
"nyc": "^11.0.0",
"remark-cli": "^3.0.0",
"remark-preset-wooorm": "^3.0.0",
"tape": "^4.0.0",
"xo": "^0.17.0"
"xo": "^0.18.0"
},
"scripts": {
"build-md": "remark . --quiet --frail",
"build-md": "remark . -qfo",
"build-bundle": "browserify index.js --bare -s fault > fault.js",

@@ -43,3 +43,3 @@ "build-mangle": "esmangle fault.js > fault.min.js",

"lint": "xo",
"test-api": "node test.js",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test.js",

@@ -56,2 +56,3 @@ "test": "npm run build && npm run lint && npm run test-coverage"

"space": true,
"esnext": false,
"ignores": [

@@ -62,5 +63,6 @@ "fault.js"

"remarkConfig": {
"output": true,
"presets": "wooorm"
"plugins": [
"preset-wooorm"
]
}
}

@@ -25,10 +25,4 @@ # fault [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

Error: Hello Eric!
at ~/fault/index.js:22:16
at Object.<anonymous> (~/fault/example.js-tmp:4:13)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at FormattedError (~/node_modules/fault/index.js:30:12)
at Object.<anonymous> (~/example.js:3:7)
...

@@ -49,11 +43,4 @@ ```

TypeError: Who doesn’t like 3.141593? 🍰
at Function.<anonymous> (~/fault/index.js:22:16)
at Object.<anonymous> (~/fault/example.js-tmp:10:18)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
...
at Function.FormattedError [as type] (~/node_modules/fault/index.js:30:12)
at Object.<anonymous> (~/example.js:3:7)
```

@@ -69,18 +56,18 @@

* `format` (`string`, optional);
* `values` (`*`, optional).
* `format` (`string`, optional)
* `values` (`*`, optional)
###### Formatters
* `%s` — String;
* `%b` — Binary;
* `%c` — Character;
* `%d` — Decimal;
* `%f` — Floating point;
* `%o` — Octal;
* `%x` — Lowercase hexadecimal;
* `%X` — Uppercase hexadecimal;
* `%` followed by any other character, prints that character.
* `%s` — String
* `%b` — Binary
* `%c` — Character
* `%d` — Decimal
* `%f` — Floating point
* `%o` — Octal
* `%x` — Lowercase hexadecimal
* `%X` — Uppercase hexadecimal
* `%` followed by any other character, prints that character
See [samsonjs/format][fmt] for argument parsing.
See [`samsonjs/format`][fmt] for argument parsing.

@@ -93,8 +80,8 @@ ###### Returns

* `fault.eval(format?[, values...])` — [EvalError][];
* `fault.range(format?[, values...])` — [RangeError][];
* `fault.reference(format?[, values...])` — [ReferenceError][];
* `fault.syntax(format?[, values...])` — [SyntaxError][];
* `fault.type(format?[, values...])` — [TypeError][];
* `fault.uri(format?[, values...])` — [URIError][].
* `fault.eval(format?[, values...])` — [EvalError][]
* `fault.range(format?[, values...])` — [RangeError][]
* `fault.reference(format?[, values...])` — [ReferenceError][]
* `fault.syntax(format?[, values...])` — [SyntaxError][]
* `fault.type(format?[, values...])` — [TypeError][]
* `fault.uri(format?[, values...])` — [URIError][]

@@ -101,0 +88,0 @@ #### `fault.create(Constructor)`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc