Socket
Socket
Sign inDemoInstall

dot-prop

Package Overview
Dependencies
1
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.2.0 to 5.3.0

4

index.d.ts

@@ -38,2 +38,3 @@ declare const dotProp: {

@param value - Value to set at `path`.
@returns The object.

@@ -81,2 +82,3 @@ @example

@param path - Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key.
@returns A boolean of whether the property existed before being deleted.

@@ -98,5 +100,5 @@ @example

*/
delete(object: {[key: string]: any}, path: string): void;
delete(object: {[key: string]: any}, path: string): boolean;
};
export = dotProp;

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

if (!isObj(object) || typeof path !== 'string') {
return;
return false;
}

@@ -107,3 +107,3 @@

delete object[p];
return;
return true;
}

@@ -114,3 +114,3 @@

if (!isObj(object)) {
return;
return false;
}

@@ -117,0 +117,0 @@ }

{
"name": "dot-prop",
"version": "5.2.0",
"version": "5.3.0",
"description": "Get, set, or delete a property from a nested object using a dot path",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -74,2 +74,4 @@ # dot-prop [![Build Status](https://travis-ci.org/sindresorhus/dot-prop.svg?branch=master)](https://travis-ci.org/sindresorhus/dot-prop)

Returns a boolean of whether the property existed before being deleted.
#### object

@@ -76,0 +78,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc