marekdano / dotpather

traverse dot paths for object values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotpather

Build Status npm install npm version js-standard-style License

Utility for looking up object properties based on dot-paths

usage

var dotpather = require('dotpather')

var lookup = dotpather('whatever.route.you.want')

var result = lookup({whatever: {route: {you: {want: 'bingo'}}}})

console.log(result) // "bingo"

var badResults = renderer({}) || renderer() || renderer(null)

console.log(badResults) // undefined

license

MIT

ezoic increase your site revenue

About

traverse dot paths for object values

License:MIT License


Languages

Language:TypeScript 91.7%Language:JavaScript 8.3%