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

@gedit/utils

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gedit/utils - npm Package Compare versions

Comparing version 0.1.46 to 0.1.48

3

lib/common/objects.d.ts

@@ -1,2 +0,2 @@

export declare function deepClone<T>(obj: T): T;
export declare const deepClone: any;
export declare function deepFreeze<T>(obj: T): T;

@@ -46,2 +46,3 @@ export declare function notEmpty<T>(arg: T | undefined | null): arg is T;

export declare function setByKey(target: any, key: string, newValue: any, autoCreateObject?: boolean): boolean;
export declare const NOOP: () => void;
//# sourceMappingURL=objects.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setByKey = exports.getByKey = exports.mapKeys = exports.mapValues = exports.reduce = exports.omit = exports.pick = exports.filter = exports.values = exports.each = exports.isEmpty = exports.notEmpty = exports.deepFreeze = exports.deepClone = void 0;
exports.NOOP = exports.setByKey = exports.getByKey = exports.mapKeys = exports.mapValues = exports.reduce = exports.omit = exports.pick = exports.filter = exports.values = exports.each = exports.isEmpty = exports.notEmpty = exports.deepFreeze = exports.deepClone = void 0;
/********************************************************************************

@@ -21,24 +21,23 @@ * Copyright (C) 2018 Ericsson and others.

var keys = Object.keys;
function deepClone(obj) {
if (!obj || typeof obj !== 'object') {
return obj;
exports.deepClone = require('lodash.clonedeep');
/* export function deepClone<T>(obj: T): T {
if (!obj || typeof obj !== 'object') {
return obj;
}
if (obj instanceof RegExp) {
return obj;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result: any = Array.isArray(obj) ? [] : {};
keys(obj).forEach((key: string) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const prop = (<any>obj)[key];
if (prop && typeof prop === 'object') {
result[key] = deepClone(prop);
} else {
result[key] = prop;
}
if (obj instanceof RegExp) {
return obj;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var result = Array.isArray(obj) ? [] : {};
keys(obj).forEach(function (key) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var prop = obj[key];
if (prop && typeof prop === 'object') {
result[key] = deepClone(prop);
}
else {
result[key] = prop;
}
});
return result;
}
exports.deepClone = deepClone;
});
return result;
} */
function deepFreeze(obj) {

@@ -159,2 +158,3 @@ if (!obj || typeof obj !== 'object') {

exports.setByKey = setByKey;
exports.NOOP = function () { };
//# sourceMappingURL=objects.js.map

@@ -18,4 +18,4 @@ "use strict";

properties: {
x: { label: 'x', default: 0, type: 'float' },
y: { label: 'y', default: 0, type: 'float' }
x: { label: 'x', default: 0.5, type: 'float' },
y: { label: 'y', default: 0.5, type: 'float' }
},

@@ -22,0 +22,0 @@ type: 'object',

{
"name": "@gedit/utils",
"version": "0.1.46",
"version": "0.1.48",
"license": "MIT",

@@ -13,2 +13,3 @@ "main": "lib/common/index",

"@types/classnames": "^2.2.10",
"@types/lodash.clonedeep": "^4.5.6",
"@types/lodash.debounce": "4.0.3",

@@ -18,2 +19,3 @@ "classnames": "^2.2.6",

"is-electron": "^2.1.0",
"lodash.clonedeep": "^4.5.0",
"lodash.debounce": "^4.0.8",

@@ -32,3 +34,3 @@ "vscode-uri": "^2.1.1"

},
"gitHead": "e761d7ae6c701701ef4608fa67976dbd93cf9280"
"gitHead": "6aabb78f19f490d6ee62b298db9aa4fbb6452658"
}

@@ -19,3 +19,5 @@ /********************************************************************************

export function deepClone<T>(obj: T): T {
export const deepClone = require('lodash.clonedeep');
/* export function deepClone<T>(obj: T): T {
if (!obj || typeof obj !== 'object') {

@@ -39,3 +41,3 @@ return obj;

return result;
}
} */

@@ -148,1 +150,3 @@ export function deepFreeze<T>(obj: T): T {

export const NOOP = () => {};

@@ -54,4 +54,4 @@ import { Schema, SchemaDecoration } from './schema';

properties: {
x: {label: 'x', default: 0, type: 'float'},
y: {label: 'y', default: 0, type: 'float'}
x: {label: 'x', default: 0.5, type: 'float'},
y: {label: 'y', default: 0.5, type: 'float'}
},

@@ -58,0 +58,0 @@ type: 'object',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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