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

pouchdb-errors

Package Overview
Dependencies
Maintainers
11
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-errors - npm Package Compare versions

Comparing version 7.3.1 to 8.0.0

34

lib/index.es.js

@@ -1,22 +0,20 @@

import inherits from 'inherits';
class PouchError extends Error {
constructor(status, error, reason) {
super();
this.status = status;
this.name = error;
this.message = reason;
this.error = true;
}
inherits(PouchError, Error);
function PouchError(status, error, reason) {
Error.call(this, reason);
this.status = status;
this.name = error;
this.message = reason;
this.error = true;
toString() {
return JSON.stringify({
status: this.status,
name: this.name,
message: this.message,
reason: this.reason
});
}
}
PouchError.prototype.toString = function () {
return JSON.stringify({
status: this.status,
name: this.name,
message: this.message,
reason: this.reason
});
};
var UNAUTHORIZED = new PouchError(401, 'unauthorized', "Name or password is incorrect.");

@@ -23,0 +21,0 @@ var MISSING_BULK_DOCS = new PouchError(400, 'bad_request', "Missing JSON list of 'docs'");

@@ -5,25 +5,21 @@ 'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
class PouchError extends Error {
constructor(status, error, reason) {
super();
this.status = status;
this.name = error;
this.message = reason;
this.error = true;
}
var inherits = _interopDefault(require('inherits'));
inherits(PouchError, Error);
function PouchError(status, error, reason) {
Error.call(this, reason);
this.status = status;
this.name = error;
this.message = reason;
this.error = true;
toString() {
return JSON.stringify({
status: this.status,
name: this.name,
message: this.message,
reason: this.reason
});
}
}
PouchError.prototype.toString = function () {
return JSON.stringify({
status: this.status,
name: this.name,
message: this.message,
reason: this.reason
});
};
var UNAUTHORIZED = new PouchError(401, 'unauthorized', "Name or password is incorrect.");

@@ -30,0 +26,0 @@ var MISSING_BULK_DOCS = new PouchError(400, 'bad_request', "Missing JSON list of 'docs'");

{
"name": "pouchdb-errors",
"version": "7.3.1",
"version": "8.0.0",
"description": "Errors exposed by PouchDB.",

@@ -15,5 +15,3 @@ "main": "./lib/index.js",

"jsnext:main": "./lib/index.es.js",
"dependencies": {
"inherits": "2.0.4"
},
"dependencies": {},
"module": "./lib/index.es.js",

@@ -20,0 +18,0 @@ "files": [

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