Comparing version 4.1.0 to 4.1.1
@@ -25,3 +25,3 @@ 'use strict'; | ||
if (!isObj(obj) || typeof path !== 'string') { | ||
return obj; | ||
return value === undefined ? obj : value; | ||
} | ||
@@ -28,0 +28,0 @@ |
{ | ||
"name": "dot-prop", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Get, set, or delete a property from a nested object using a dot path", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -60,3 +60,3 @@ # dot-prop [![Build Status](https://travis-ci.org/sindresorhus/dot-prop.svg?branch=master)](https://travis-ci.org/sindresorhus/dot-prop) | ||
### get(obj, path, [value]) | ||
### get(obj, path, [defaultValue]) | ||
@@ -87,7 +87,13 @@ ### set(obj, path, value) | ||
Value to set at `path` or optional default value to return from get. | ||
Value to set at `path`. | ||
#### defaultValue | ||
Type: `any` | ||
Default value. | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5757
98