Comparing version 0.0.9 to 0.0.10
{ | ||
"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 |
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
11017
110