Socket
Socket
Sign inDemoInstall

set-value

Package Overview
Dependencies
2
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

18

index.js

@@ -28,3 +28,3 @@ /*!

const keys = isArray ? path : split(path, opts);
const keys = (isArray ? path : split(path, opts)).filter(isValidKey);
const len = keys.length;

@@ -102,14 +102,8 @@ const orig = target;

function isValidKey(key) {
return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';
}
function isObject(val) {
switch (typeof val) {
case 'null':
return false;
case 'object':
return true;
case 'function':
return true;
default: {
return false;
}
}
return val !== null && (typeof val === 'object' || typeof val === 'function');
}

@@ -116,0 +110,0 @@

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

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

"es5-dot-prop": "^4.1.1",
"gulp-format-md": "^1.0.0",
"gulp-format-md": "^2.0.0",
"lodash.set": "^4.3.2",

@@ -128,5 +128,7 @@ "minimist": "^1.2.0",

"set-nested-prop",
"setvalue"
"setvalue",
"split-string",
"update"
]
}
}

@@ -1,2 +0,2 @@

# set-value [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/set-value)
# set-value [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/set-value.svg?style=flat)](https://www.npmjs.com/package/set-value) [![NPM monthly downloads](https://img.shields.io/npm/dm/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![NPM total downloads](https://img.shields.io/npm/dt/set-value.svg?style=flat)](https://npmjs.org/package/set-value) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/set-value.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/set-value)

@@ -15,6 +15,10 @@ > Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.

## Heads up!
[Please update](https://github.com/update/update) to version 3.0.1 or later, a critical bug was fixed in that version.
## Usage
```js
var set = require('set-value');
const set = require('set-value');
set(object, prop, value);

@@ -34,3 +38,3 @@ ```

```js
var obj = {};
const obj = {};
set(obj, 'a.b.c', 'd');

@@ -215,7 +219,8 @@ console.log(obj);

| **Commits** | **Contributor** |
| --- | --- |
| 64 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [vadimdemedes](https://github.com/vadimdemedes) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
| **Commits** | **Contributor** |
| --- | --- |
| 71 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [mbelsky](https://github.com/mbelsky) |
| 1 | [vadimdemedes](https://github.com/vadimdemedes) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |

@@ -226,9 +231,9 @@ ### Author

* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

@@ -238,2 +243,2 @@

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 05, 2018._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on June 19, 2019._

Sorry, the diff of this file is not supported yet

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