Socket
Socket
Sign inDemoInstall

get-prop

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-prop - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

bower.json
{
"name": "getprop",
"main": "getprop.js",
"version": "0.0.9",
"version": "0.0.10",
"homepage": "https://github.com/miguelmota/getprop",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "get-prop",
"version": "0.0.9",
"version": "0.0.10",
"description": "Get a property from object",

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

@@ -25,3 +25,3 @@ # getprop

```javascript
var value = getProp(obj, 'qux.zee.peep.2.__data', 'default value');
var value = getProp(obj, ['qux', 'zee', 'peep', 2, '__data']);
```

@@ -100,10 +100,12 @@

objProp('foo') // 'bar'
objProp('[foo.bar]') // 'noob'
objProp('qux') // 'noob'
objProp('yo', 'wut') // 'wut'
objProp(['foo']) // 'bar'
objProp('[foo.bar']) // 'noob'
objProp(['qux']) // 'noob'
objProp(['yo'], 'wut') // 'wut'
```
For a boolean version of this, check out the module [hasprop](https://github.com/miguelmota/hasprop).
# License
MIT
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