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

h3lp

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h3lp - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

38

infrastructure/object.js

@@ -157,21 +157,31 @@ "use strict";

const target = {};
for (const key of Object.keys(source).sort()) {
if (source[key] === null) {
target[key] = null;
if (source === null) {
return null;
}
else if (Array.isArray(source)) {
const propertyKey = this.getKeyProperty(source[0]);
if (propertyKey) {
const result = source.map((p) => this.sort(p)).sort((a, b) => a[propertyKey] > b[propertyKey] ? 1 : -1);
return result;
}
else if (Array.isArray(source[key])) {
const propertyKey = this.getKeyProperty(source[key]);
if (propertyKey) {
target[key] = source[key].sort((a, b) => a[propertyKey] > b[propertyKey] ? 1 : -1).map((p) => this.sort(p));
else {
const result = source.map((p) => this.sort(p)).sort((a, b) => JSON.stringify(a) > JSON.stringify(b) ? 1 : -1);
return result;
}
}
else if (typeof source === 'object') {
for (const key of Object.keys(source).sort()) {
if (source[key] === null) {
target[key] = null;
}
else if (Array.isArray(source[key])) {
target[key] = this.sort(source[key]);
}
else if (typeof source[key] === 'object') {
target[key] = this.sort(source[key]);
}
else {
target[key] = source[key].map((p) => this.sort(p));
target[key] = source[key];
}
}
else if (typeof source[key] === 'object') {
target[key] = this.sort(source[key]);
}
else {
target[key] = source[key];
}
}

@@ -178,0 +188,0 @@ return target;

{
"name": "h3lp",
"version": "1.10.0",
"version": "1.10.1",
"description": "Helper for nodeJs",

@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>",

Sorry, the diff of this file is not supported yet

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