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

@felte/common

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@felte/common - npm Package Compare versions

Comparing version 1.0.0-next.2 to 1.0.0-next.3

10

dist/esm/utils/unset.js
import { _cloneDeep } from './cloneDeep.js';
import { _get } from './get.js';
function _unset(obj, path) {
if (Object(obj) !== obj)
if (!obj || Object(obj) !== obj)
return;

@@ -13,6 +14,3 @@ // When obj is not an object

: path;
const foundProp = newPath.slice(0, -1).reduce((a, c) => Object(a[c]) === a[c] // Does the key exist and is its value an object?
? // Yes: then follow that path
a[c]
: undefined, obj);
const foundProp = _get(obj, newPath.slice(0, -1).join('.'));
if (Array.isArray(foundProp)) {

@@ -24,3 +22,3 @@ foundProp.splice(Number(newPath[newPath.length - 1]), 1);

}
return obj; // Return the top-level object to allow chaining
return obj;
}

@@ -27,0 +25,0 @@

9

dist/index.js

@@ -159,3 +159,3 @@ 'use strict';

function _unset(obj, path) {
if (Object(obj) !== obj)
if (!obj || Object(obj) !== obj)
return;

@@ -169,6 +169,3 @@ // When obj is not an object

: path;
const foundProp = newPath.slice(0, -1).reduce((a, c) => Object(a[c]) === a[c] // Does the key exist and is its value an object?
? // Yes: then follow that path
a[c]
: undefined, obj);
const foundProp = _get(obj, newPath.slice(0, -1).join('.'));
if (Array.isArray(foundProp)) {

@@ -180,3 +177,3 @@ foundProp.splice(Number(newPath[newPath.length - 1]), 1);

}
return obj; // Return the top-level object to allow chaining
return obj;
}

@@ -183,0 +180,0 @@

{
"name": "@felte/common",
"version": "1.0.0-next.2",
"version": "1.0.0-next.3",
"description": "Common utilities for Felte packages",

@@ -5,0 +5,0 @@ "author": "Pablo Berganza <pablo@berganza.dev>",

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