Socket
Socket
Sign inDemoInstall

set-value

Package Overview
Dependencies
20
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.2 to 0.3.3

16

index.js

@@ -10,9 +10,13 @@ /*!

var utils = require('./utils');
var toPath = require('to-object-path');
var extend = require('extend-shallow');
var isObject = require('isobject');
module.exports = function (obj, path, val) {
if (typeof obj !== 'object') return obj;
module.exports = function(obj, path, val) {
if (typeof obj !== 'object') {
return obj;
}
if (Array.isArray(path)) {
path = utils.toPath(path);
path = toPath(path);
}

@@ -48,4 +52,4 @@

if (obj.hasOwnProperty(last) && typeof obj[last] === 'object') {
if (utils.isObject(val)) {
utils.extend(obj[last], val);
if (isObject(val)) {
extend(obj[last], val);
} else {

@@ -52,0 +56,0 @@ obj[last] = val;

{
"name": "set-value",
"description": "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.",
"version": "0.3.2",
"version": "0.3.3",
"homepage": "https://github.com/jonschlinkert/set-value",

@@ -13,4 +13,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"files": [
"index.js",
"utils.js"
"index.js"
],

@@ -27,6 +26,6 @@ "main": "index.js",

"isobject": "^2.0.0",
"lazy-cache": "^0.2.4",
"to-object-path": "^0.2.0"
},
"devDependencies": {
"gulp-format-md": "^0.1.5",
"mocha": "*",

@@ -33,0 +32,0 @@ "should": "*"

@@ -7,3 +7,3 @@ # set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg)](https://www.npmjs.com/package/set-value) [![Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg)](https://travis-ci.org/jonschlinkert/set-value)

Install with [npm](https://www.npmjs.com/)
Install with [npm](https://www.npmjs.com/):

@@ -57,3 +57,3 @@ ```sh

Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the MIT license.

@@ -63,2 +63,2 @@

_This file was generated by [verb](https://github.com/verbose/verb) on December 10, 2015._
_This file was generated by [verb](https://github.com/verbose/verb) on January 19, 2016._
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