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

electrodb

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrodb - npm Package Compare versions

Comparing version 0.9.6 to 0.9.7

2

package.json
{
"name": "electrodb",
"version": "0.9.6",
"version": "0.9.7",
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",

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

@@ -215,5 +215,3 @@ "use strict";

async go(method, params = {}, options = {}) {
_applyParameterOptions(params = {}, options = {}) {
let config = {

@@ -228,9 +226,24 @@ includeKeys: options.includeKeys,

let parameters = Object.assign({}, params);
for (let [name, value] of Object.entries(config.params)) {
if (value !== undefined) {
parameters[name] = value;
for (let customParameter of Object.keys(config.params)) {
if (config.params[customParameter] !== undefined) {
parameters[customParameter] = config.params[customParameter];
}
}
if (Object.keys(config.page || {}).length) {
parameters.ExclusiveStartKey = config.page;
}
return parameters;
}
async go(method, params = {}, options = {}) {
let config = {
includeKeys: options.includeKeys,
originalErr: options.originalErr,
raw: options.raw,
params: options.params || {},
page: options.page,
pager: !!options.pager
};
let parameters = Object.assign({}, params);
let stackTrace = new Error();

@@ -255,13 +268,15 @@ try {

_params({ keys = {}, method = "", put = {}, update = {}, filter = {} } = {}) {
_params({ keys = {}, method = "", put = {}, update = {}, filter = {} } = {}, options = {}) {
let conlidatedQueryFacets = this._consolidateQueryFacets(keys.sk);
let params = {}
switch (method) {
case MethodTypes.get:
case MethodTypes.delete:
return this._makeSimpleIndexParams(keys.pk, ...conlidatedQueryFacets);
params = this._makeSimpleIndexParams(keys.pk, ...conlidatedQueryFacets);
break;
case MethodTypes.put:
return this._makePutParams(put, keys.pk, ...keys.sk);
params = this._makePutParams(put, keys.pk, ...keys.sk);
break;
case MethodTypes.update:
return this._makeUpdateParams(
params = this._makeUpdateParams(
update,

@@ -271,7 +286,10 @@ keys.pk,

);
break;
case MethodTypes.scan:
return this._makeScanParam(filter);
params = this._makeScanParam(filter);
break;
default:
throw new Error(`Invalid method: ${method}`);
}
return this._applyParameterOptions(params, options);
}

@@ -526,7 +544,3 @@

}
// if (typeof options.page === "string" && options.page.length) {
if (Object.keys(options.page || {}).length) {
parameters.ExclusiveStartKey = options.page;
}
return parameters;
return this._applyParameterOptions(parameters, options);
}

@@ -533,0 +547,0 @@

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