This was done as practice in migrating a JavaScript app to TypeScript following Joe Previte's email tutorial series.
Utility for looking up object properties based on dot-paths
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
- TypeScript
- Vite
- Vitest
- NeoVim
MIT