UNPKG

@yopem/object-parser

Version:
32 lines (24 loc) 788 B
# @yopem/object-parser A TypeScript utility library for safely accessing and validating nested object properties. ## Features - Safely navigate nested object properties with path-based access - Type validation for common data types (string, number, boolean, etc.) - Helpful error messages with path information when properties don't exist - Support for checking existence of properties with the `has` method - Create sub-parsers for nested objects ## Installation ```sh npm install @yopem/object-parser # or pnpm add @yopem/object-parser # or yarn add @yopem/object-parser # or bun add @yopem/object-parser # or deno install npm:@yopem/object-parser ``` ## Licence This project is licensed under the terms of the [MIT license](https://github.com/yopem/utils/blob/main/LICENSE.md).