Socket
Socket
Sign inDemoInstall

dot-prop

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dot-prop - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

5

index.js

@@ -56,5 +56,6 @@ 'use strict';

if (!isObj(obj) || typeof path !== 'string') {
return;
return obj;
}
const root = obj;
const pathArr = getPathSegments(path);

@@ -75,2 +76,4 @@

}
return root;
},

@@ -77,0 +80,0 @@

2

package.json
{
"name": "dot-prop",
"version": "4.1.1",
"version": "4.2.0",
"description": "Get, set, or delete a property from a nested object using a dot path",

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

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

const foo = dotProp.set({}, 'foo.bar', 'c');
console.log(foo);
//=> {foo: {bar: 'c'}}
dotProp.set(obj, 'foo.baz', 'x');

@@ -65,2 +69,4 @@ console.log(obj);

Returns the object.
### has(obj, path)

@@ -67,0 +73,0 @@

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