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

appolo-utils

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appolo-utils - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

9

lib/objects.js

@@ -13,2 +13,11 @@ "use strict";

}
static closeDeep(obj) {
let output = Array.isArray(obj) ? [] : {};
let keys = Object.keys(obj);
for (let i = 0, len = keys.length; i < len; i++) {
let key = keys[i], value = obj[key];
output[key] = (value == null || typeof value != "object") ? value : Objects.closeDeep(value);
}
return output;
}
static compact(obj) {

@@ -15,0 +24,0 @@ let output = {};

17

lib/objects.ts

@@ -10,6 +10,21 @@ export class Objects {

public static cloneFast(obj: any): any {
public static cloneFast<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj))
}
public static closeDeep<T>(obj: T): T {
let output = Array.isArray(obj) ? [] : {};
let keys = Object.keys(obj);
for (let i = 0, len = keys.length; i < len; i++) {
let key = keys[i],value = obj[key];
output[key] = (value == null || typeof value != "object") ?value : Objects.closeDeep(value)
}
return output as any;
}
public static compact(obj: any): any {

@@ -16,0 +31,0 @@

2

package.json

@@ -17,3 +17,3 @@ {

"main": "./index.js",
"version": "0.0.17",
"version": "0.0.18",
"license": "MIT",

@@ -20,0 +20,0 @@ "repository": {

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