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

@xapp/dynamo-service

Package Overview
Dependencies
Maintainers
6
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/dynamo-service - npm Package Compare versions

Comparing version 0.0.88 to 0.0.89

.npmignore

2

dist/utils/Object.d.ts

@@ -5,3 +5,3 @@ export declare function objHasAttrs(obj: object): boolean;

export declare function throwIfDoesContain(obj: string[], bannedAttrs: string[], onError?: ValidationErrorHandler): void;
export declare function throwIfDoesNotContain<T>(obj: T, requiredAttrs: string[], undefinedPermitted?: boolean, onError?: ValidationErrorHandler): void;
export declare function throwIfDoesNotContain<T>(obj: T, requiredAttrs: (keyof T)[], undefinedPermitted?: boolean, onError?: ValidationErrorHandler): void;
export declare function throwIfContainsExtra<T extends object>(obj: T, restrictAttrs: (keyof T)[], undefinedPermitted?: boolean, onError?: ValidationErrorHandler): void;

@@ -8,0 +8,0 @@ export declare function subset<T>(obj: T, attrs: string[]): Partial<T>;

@@ -35,11 +35,12 @@ "use strict";

}
const subs = subset(obj, requiredAttrs);
const keys = Object.keys(subs);
if (keys.length !== requiredAttrs.length) {
const difference = requiredAttrs.filter((key) => {
return keys.indexOf(key) < 0;
});
const error = new Error("Object must contain keys: '" + difference.join(", "));
onError(difference, error);
const missingKeys = [];
for (const requiredAttr of requiredAttrs) {
const value = obj[requiredAttr];
if (value == null) {
missingKeys.push(requiredAttr);
}
}
if (missingKeys.length > 0) {
onError(missingKeys, new Error("Object must contain keys: '" + missingKeys.join(", ")));
}
}

@@ -46,0 +47,0 @@ exports.throwIfDoesNotContain = throwIfDoesNotContain;

{
"name": "@xapp/dynamo-service",
"version": "0.0.88",
"version": "0.0.89",
"description": "A dynamo help class which will help maintain data integrity.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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