Socket
Socket
Sign inDemoInstall

nested-property

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.7 to 1.0.1

4

index.js

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

return split.reduce(function (obj, prop, idx) {
obj[prop] = obj[prop] || {};
const nextPropIsNumber = Number.isInteger(Number(split[idx + 1]));
obj[prop] = obj[prop] || (nextPropIsNumber ? [] : {})
if (split.length == (idx + 1)) {

@@ -96,0 +98,0 @@ obj[prop] = value;

{
"name": "nested-property",
"description": "Read, write or test a data structure's nested property via a string like 'my.nested.property'. It works through arrays and objects.'",
"version": "0.0.7",
"version": "1.0.1",
"homepage": "https://github.com/cosmosio/nested-property",

@@ -17,2 +17,8 @@ "licenses": [

"author": "Olivier Scherrer <pode.fr@gmail.com>",
"contributors": [
{
"name": "Igor Barbosa",
"url": "https://github.com/igor-barbosa"
}
],
"keywords": [

@@ -36,3 +42,3 @@ "nested",

"scripts": {
"test": "mocha"
"test": "mocha test/"
},

@@ -42,5 +48,5 @@ "main": "index.js",

"chai": "~1.9.1",
"mocha": "~1.18.2",
"mocha": "^6.1.4",
"sinon": "~1.12.2"
}
}

@@ -184,2 +184,12 @@ Nested property

### 1.0.1 - 22 JUNE 209
* Update to mocha 6.4.1 to remove security alerts on dependencies
### 1.0.0 - 22 JUNE 2019
* Breaking Change: When calling `set()` with an integer in the path and `nested-property` creates an object at the location, the object is now an array instead of an object. Hopefully, no user of the `nested-property` package should have been expecting to see an object instead of an array, but this constitutes a breaking changes, hence the major update in the semver.
Thanks [igor-barbosa](https://github.com/igor-barbosa) for the suggestion: [PR #2](https://github.com/cosmosio/nested-property/pull/2)
### 0.0.7 - 09 AUG 2016

@@ -186,0 +196,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