1.0.0 • Published 3 years ago

@ds-pack/get v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

@ds-pack/get

A utility for accessing values in deeply nested objects using key paths.

Installation:

yarn add @ds-pack/get

Usage:

import get from '@ds-pack/get'

let theme = {
  colors: {
    blue: ['cadetblue', 'steelblue', 'cornflowerblue'],
  },
}

get(theme, 'colors.blue.2') // 'cornflowerblue'

Tools:

  • Typescript
  • Babel
  • Jest