Utilizing Stric Utilities
Stricjs offers a comprehensive utility library, @stricjs/utils
, designed to support various web development needs. This library is standalone and can be used independently of other Stric components like @stricjs/app
.
Installation
Install @stricjs/utils
using Bun with the following command:
bash
bun add @stricjs/utils
bun add @stricjs/utils
Features
The utility library encompasses a wide range of tools and functions:
- CORS Handling: Simplify the process of configuring Cross-Origin Resource Sharing.
- CSP Header Builder: Easily construct Content Security Policy headers to enhance security.
- Cookie Builder: Facilitate the creation and management of cookies.
- Basic Authentication Header Parsers: Decode and parse headers used in basic HTTP authentication.
- And More: The library includes additional utilities that cater to various web development scenarios.
Versatility
A key advantage of @stricjs/utils
is its flexibility:
- Standalone Usage: While it integrates seamlessly with
@stricjs/app
, it can also be used independently in any web development project. - Broad Applicability: Its wide range of functions makes it suitable for various use cases, from security to data management.
By integrating @stricjs/utils
into your project, you gain access to a toolkit designed to streamline and enhance your web development experience, whether you're working within the Stric ecosystem or on standalone projects.