New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

abstract-object

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-object - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

24

lib/Error.js

@@ -69,6 +69,9 @@ (function() {

module.exports.createError = createError = function(aType, aErrorCode) {
module.exports.createError = createError = function(aType, aErrorCode, ErrorClass) {
var Err;
AbstractError[aType] = aErrorCode;
AbstractError["is" + aType] = (function(aErrorCode, aType) {
if (ErrorClass == null) {
ErrorClass = AbstractError;
}
ErrorClass[aType] = aErrorCode;
ErrorClass["is" + aType] = (function(aErrorCode, aType) {
return function(err) {

@@ -78,15 +81,18 @@ return err.code === aErrorCode || ((err.code == null) && err.message && err.message.substring(0, aType.length) === aType);

})(aErrorCode, aType);
AbstractError.prototype[firstLower(aType)] = (function(aIsMethodName) {
ErrorClass.prototype[firstLower(aType)] = (function(aIsMethodName, ErrorClass) {
return function() {
return AbstractError[aIsMethodName](this);
return ErrorClass[aIsMethodName](this);
};
})("is" + aType);
})("is" + aType, ErrorClass);
return Err = (function() {
inherits(Err, AbstractError);
inherits(Err, ErrorClass);
function Err(msg) {
function Err(msg, aCode) {
if (aCode == null) {
aCode = aErrorCode;
}
if ((msg == null) || msg === "") {
msg = aType;
}
AbstractError.call(this, msg, aErrorCode);
Err.__super__.constructor.call(this, msg, aCode);
}

@@ -93,0 +99,0 @@

{
"name": "abstract-object",
"version": "1.3.3",
"version": "1.3.4",
"description": "AbstractObject with Object State Events Support, RefObject with RefCount and AddRef/Release Support.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/snowyu/abstract-object",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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