value-get

WebJar for value-get

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

value-get
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

value-get
WebJar for value-get
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/bendrucker/value-get

Download value-get

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/value-get/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>value-get</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/value-get/
implementation 'org.webjars.npm:value-get:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/value-get/
implementation ("org.webjars.npm:value-get:1.0.0")
'org.webjars.npm:value-get:jar:1.0.0'
<dependency org="org.webjars.npm" name="value-get" rev="1.0.0">
  <artifact name="value-get" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='value-get', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "value-get" % "1.0.0"
[org.webjars.npm/value-get "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : ap jar [0.2.0,0.3)
org.webjars.npm : dot-prop jar [2.2.0,2.3)

Project Modules

There are no modules declared in this project.

value-get Build Status Greenkeeper badge

Create functional property getters

Install

$ npm install --save value-get

Usage

var get = require('value-get')

get('foo', {foo: 'bar'})
//=> bar

var getFoo = get('foo')
getFoo({foo: 'bar'})
//=> bar

var getDeepBar = get('foo.bar')
getDeepBar({foo: {bar: 'baz'}})
//=> baz

API

get(path, [obj]) -> any

path

Required
Type: string

The string key path. The path can be a normal key or use dot property syntax for deep access. If you need an actual dot, escape it:

get('foo\\.bar', {'foo.bar': 'baz'})
//=> baz
obj

Type: object

The object to get the value from. If no object is supplied, a partially applied function with the path will be returned.

License

MIT © Ben Drucker

Versions

Version
1.0.0