open-index/open-npm huggingface dataset:
npm package: @glihmware/svweb
Description: A modern web utilities library for Svelte with tree-shaking support.
Latest version: 0.0.1

# @glihmware/svweb

A modern web utilities library for Svelte with tree-shaking support.

## Features

- **API Client** - HTTP client with automatic content-type detection
- **Web Storage** - Browser storage utilities with Svelte integration

## Installation

```bash
pnpm add @glihmware/svweb
# or
npm install @glihmware/svweb
```

## Usage

This library **only supports path-based imports** for optimal tree-shaking and performance:

```javascript
// ✅ ONLY way to import - Path-based imports
import { ApiClient, ApiClientError } from '@glihmware/svweb/api';
import { WebStorage, StorageType } from '@glihmware/svweb/storage';

// API Client
const client = new ApiClient({
  baseUrl: 'https://api.example.com'
});

const data = await client.get('/users');

// Web Storage
const storage = new WebStorage(StorageType.LOCAL);
storage.set('key', 'value');
```

**Note**: There is no main export. You must use the specific module paths (`/api`, `/storage`) to import functionality.

## API client

The API client is a simple API client that makes HTTP requests to a given URL, using the Fetch API.

## Web storage

The web storage is a simple web storage that stores data in the browser.

## Dev flow

To run the tests, run:

```bash
pnpm run test
```

To update the docs, run:

```bash
pnpm run docs:build
```

To open the docs, run:

```bash
pnpm run docs:open
```

To build the library, run:

```bash
pnpm run build:lib
```

To build the library and pack it, run:

```bash
pnpm run pack
```