This is a set of simple utility functions designed to help make accessing objects in Typescript easier and safer.
Install via your favorite package manager:
yarn add key-narrower
All functions have built-in JSDoc documentation. As this is primarily useful in Typescript projects, try using your editor's type sensing functionality to see how the functions narrow the types of your variables.
Pull requests are welcome! To get started with this project, run:
yarn install && yarn run husky install
if anyone knows the Yarn Berry equivalent of yarn prepare
,
please let me know ;)