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 5.0.0 to 5.0.1

12

index.d.ts

@@ -24,4 +24,4 @@ declare const dotProp: {

*/
get<T = unknown>(
object: {[key: string]: unknown},
get<T>(
object: {[key: string]: any},
path: string,

@@ -54,3 +54,3 @@ defaultValue?: T

*/
set<T extends {[key: string]: unknown}>(
set<T extends {[key: string]: any}>(
object: T,

@@ -73,6 +73,6 @@ path: string,

*/
has(object: {[key: string]: unknown}, path: string): boolean;
has(object: {[key: string]: any}, path: string): boolean;
/**
@param object Object to delete the `path` value.
@param object - Object to delete the `path` value.
@param path - Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key.

@@ -95,5 +95,5 @@

*/
delete(object: {[key: string]: unknown}, path: string): void;
delete(object: {[key: string]: any}, path: string): void;
};
export = dotProp;
{
"name": "dot-prop",
"version": "5.0.0",
"version": "5.0.1",
"description": "Get, set, or delete a property from a nested object using a dot path",

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

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

### get(object, path, [defaultValue])
### get(object, path, defaultValue?)

@@ -77,3 +77,3 @@ ### set(object, path, value)

Type: `Object`
Type: `object`

@@ -103,4 +103,12 @@ Object to get, set, or delete the `path` value.

## License
---
MIT © [Sindre Sorhus](https://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-dot-prop?utm_source=npm-dot-prop&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
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