UNPKG

@ibnlanre/builder

Version:

Creates a builder object for defining keys and values.

36 lines (20 loc) 2.17 kB
<h1 align="center">Builder ✨</h1> <div align="center"> [![minified size](https://img.shields.io/bundlephobia/min/@ibnlanre/builder)](https://bundlephobia.com/package/@ibnlanre/builder) [![license](https://img.shields.io/github/license/ibnlanre/builder?label=license)](https://github.com/ibnlanre/builder/blob/main/LICENSE) [![version](https://img.shields.io/npm/v/@ibnlanre/builder)](https://www.npmjs.com/package/@ibnlanre/builder) [![downloads](https://img.shields.io/npm/dt/@ibnlanre/builder)](https://www.npmjs.com/package/@ibnlanre/builder) </div> ## FAQs ### What is the purpose of the @ibnlanre/builder library? The `@ibnlanre/builder` library is designed to streamline dynamic key generation, making it easier to manage cache keys in a nested object. By creating a builder object, developers can access and retrieve values from the register, without the need for manual key construction. ### How does the @ibnlanre/builder library work? The `@ibnlanre/builder` library creates a builder object using the createBuilder function. This object contains methods for retrieving the value of a key, making it easier to locate and reuse keys. By chaining the nodes of a register into an array of keys, it streamlines the process of key generation and retrieval. ### What are the key features of the @ibnlanre/builder library? The key features of the `@ibnlanre/builder` library include the builder object, dynamic key generation, colocation of values, efficient value retrieval, flexible usage, and type safety. These features make it easier to manage cache keys in a nested object, improving code readability and maintainability. ### How can I customize key generation with the @ibnlanre/builder library? You can customize key generation with the `@ibnlanre/builder` library by providing an array of prefixes. These prefixes are used to generate the keys for the builder object, making it easier to access and retrieve values from a register. ## License The `@ibnlanre/builder` library is licensed under the [MIT][mit] License. For more information, please refer to the [LICENSE][license] file. [license]: LICENSE.md [mit]: https://www.mit.edu/about