Socket
Book a DemoInstallSign in
Socket

safer-get

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

safer-get

Small utility for accessing deep nested parameters in Typescript

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

Safer get

npm Build Status Coverage Status npm bundle size

Small utility for accessing deep nested parameters in Typescript

Usage

  • safer(object: Object, ...keyArray: string[]) - Gets the value at path of object. keyArray is typed and has a maximum depth of 7.

Params

OptionDescriptionDefault Value
objectBase object to access the valuesundefined
keyArrayArray of paths to the desired value. It is typed and has a maximum depth of 7.undefined
import { safer } from 'safer-get'

const data = { its: { really: { super: { nested: undefined } } } }
const result = safer(data, 'its', 'really', 'super', 'nested')

Keywords

rest

FAQs

Package last updated on 16 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.