Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diver

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diver - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "diver",
"version": "1.1.0",
"version": "1.1.1",
"description": "Deep access to nested object values",

@@ -5,0 +5,0 @@ "main": "index.js",

# diver
## Install
```
npm install diver
```
## API
### get
``diver.get(object, keys, [defaultValue])``
### set
``diver.set(object, keys, value)``
## Example
```
var swamp = {
'a': {
'b': 123,
't': {
'c': 89,
'v': {
'x': 'Test'
}
}
}
};
diver.get(swamp, ['a', 't', 'v', 'x'], 'Default value');
diver.set(swamp, ['z', 't', 'v', 'x'], 'test');
```
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