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.39 to 0.9.40

.idea/aws.xml

5

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

@@ -11,3 +11,4 @@ "main": "index.js",

"coverage": "nyc npm run test-all && nyc report --reporter=text-lcov | coveralls",
"coverage-local": "LOCAL_DYNAMO_ENDPOINT=http://localhost:8000 nyc npm run test-all && nyc report --reporter=html"
"coverage-coveralls-local": "nyc npm run test-all-local && nyc report --reporter=text-lcov | coveralls",
"coverage-html-local": "nyc npm run test-all-local && nyc report --reporter=html"
},

@@ -14,0 +15,0 @@ "repository": {

37

src/entity.js

@@ -773,3 +773,3 @@ "use strict";

);
let { pk, sk } = this._makeIndexKeys(
let { pk, sk } = this._makeIndexKeysWithoutTail(
state.query.index,

@@ -1167,2 +1167,25 @@ state.query.keys.pk,

/* istanbul ignore next */
_makeIndexKeysWithoutTail(index = "", pkFacets = {}, ...skFacets) {
this._validateIndex(index);
if (!skFacets.length) {
skFacets.push({});
}
let facets = this.model.facets.byIndex[index];
let prefixes = this.model.prefixes[index];
if (!prefixes) {
throw new Error(`Invalid index: ${index}`);
}
let pk = this._makeKey(prefixes.pk, facets.pk, pkFacets, this.model.facets.labels[index], true);
let sk = [];
if (this.model.lookup.indexHasSortKeys[index]) {
for (let skFacet of skFacets) {
sk.push(
this._makeKey(prefixes.sk, facets.sk, skFacet, this.model.facets.labels[index], true),
);
}
}
return { pk, sk };
}
/* istanbul ignore next */
_makeIndexKeys(index = "", pkFacets = {}, ...skFacets) {

@@ -1178,8 +1201,3 @@ this._validateIndex(index);

}
let pk = this._makeKey(
prefixes.pk,
facets.pk,
pkFacets,
this.model.facets.labels[index]
);
let pk = this._makeKey(prefixes.pk, facets.pk, pkFacets, this.model.facets.labels[index]);
let sk = [];

@@ -1197,3 +1215,3 @@ if (this.model.lookup.indexHasSortKeys[index]) {

/* istanbul ignore next */
_makeKey({prefix, isCustom} = {}, facets = [], supplied = {}, labels = {}) {
_makeKey({prefix, isCustom} = {}, facets = [], supplied = {}, labels = {}, excludeLabelTail) {
let key = prefix;

@@ -1203,2 +1221,5 @@ for (let i = 0; i < facets.length; i++) {

let { name } = this.model.schema.attributes[facet];
if (supplied[name] === undefined && excludeLabelTail) {
break;
}
if (isCustom) {

@@ -1205,0 +1226,0 @@ key = `${key}${labels[facet] === undefined ? "" : labels[facet]}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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