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

@cocreate/utils

Package Overview
Dependencies
Maintainers
0
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/utils - npm Package Compare versions

Comparing version 1.37.2 to 1.37.3

2

package.json
{
"name": "@cocreate/utils",
"version": "1.37.2",
"version": "1.37.3",
"description": "A simple utils component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -293,3 +293,6 @@ (function (root, factory) {

let oldObject = new Object(newObject);
let keys = key.replace(/\[(\d+)\]/g, ".$1").split(".");
let keys = key
.replace(/\[(\d+)\]/g, ".$1")
.split(".")
.map((k) => (isNaN(k) ? k : Number(k)));
let value = data[key];

@@ -301,3 +304,3 @@ let operator;

for (let i = 0; i < keys.length; i++) {
if (/^\d+$/.test(keys[i])) keys[i] = parseInt(keys[i]);
// if (/^\d+$/.test(keys[i])) keys[i] = parseInt(keys[i]);

@@ -416,8 +419,18 @@ if (length == i) {

else delete newObject[keys[i]];
} else newObject[keys[i]] = value;
} else if (typeof keys[i] === "number") {
newObject.splice(keys[i], 0, value);
} else {
newObject[keys[i]] = value;
}
} else if (
typeof keys[i + 1] === "number" &&
!Array.isArray(newObject[keys[i]])
) {
newObject[keys[i]] = [];
} else {
newObject[keys[i]] = oldObject[keys[i]] || {};
newObject = newObject[keys[i]];
oldObject = oldObject[keys[i]];
newObject[keys[i]] = newObject[keys[i]] || {};
// newObject[keys[i]] = oldObject[keys[i]] || {};
// oldObject = oldObject[keys[i]];
}
newObject = newObject[keys[i]];
}

@@ -424,0 +437,0 @@ }

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