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

electrodb

Package Overview
Dependencies
Maintainers
1
Versions
169
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 3.1.0 to 3.2.0

2

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

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

@@ -22,2 +22,3 @@ const {

this.refs = {};
this.formattedNameToOriginalNameMap = new Map();
}

@@ -34,10 +35,24 @@

const nameWasNotANumber = isNaN(name);
name = `${name}`.replaceAll(/[^\w]/g, "");
if (name.length === 0) {
name = "p";
} else if (nameWasNotANumber !== isNaN(name)) {
const originalName = `${name}`;
let formattedName = originalName.replaceAll(/[^\w]/g, "");
if (formattedName.length === 0) {
formattedName = "p";
} else if (nameWasNotANumber !== isNaN(formattedName)) {
// name became number due to replace
name = `p${name}`;
formattedName = `p${formattedName}`;
}
return name;
const originalFormattedName = formattedName;
let nameSuffix = 1;
while (
this.formattedNameToOriginalNameMap.has(formattedName) &&
this.formattedNameToOriginalNameMap.get(formattedName) !== originalName
) {
formattedName = `${originalFormattedName}_${++nameSuffix}`;
}
this.formattedNameToOriginalNameMap.set(formattedName, originalName);
return formattedName;
}

@@ -44,0 +59,0 @@

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

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