open-index/open-npm huggingface dataset:
npm package: @lite-base/http
Description: base http
Author: cardamon
Latest version: 1.0.0

## Installation

```bash
npm install @lite-base/http
```

```js
import http from '@lite-base/http';

// Create http instance with configuration options
const http = new http({
  baseURL: 'https://api.example.com',
  timeout: 15000,
  headers: {
    'Content-Type': 'application/json',
    // Add other default headers if needed
  },
  requestInterceptor: config => {
    // Modify config before sending the request
    // e.g., add token
    return config;
  },
  responseInterceptor: responseData => {
    // Perform operations on the response data before handling it
    return responseData;
  },
});

// Make a request using the instance
http.request('GET', '/data')
  .then(data => {
    console.log('Successfully retrieved data:', data);
  })
  .catch(error => {
    console.error('Request failed:', error);
  });
```
npm package: @lite-base/storage
Description: ```javascript import { session, local, indexdb } from '@lite-base/storage';
Author: cardamon
Latest version: 1.0.1

## Usage

```javascript
import { session, local, indexdb } from '@lite-base/storage';

// Example Usage
session.set('username', 'john_doe'); // Set data
session.get('username'); // Retrieve data
session.remove('username'); // Remove data
session.clearAll(); // Clear all session data

local.set('username', 'john_doe', 3600); // Set data with a one-hour expiration
local.get('username'); // Retrieve data
local.remove('username'); // Remove data
local.clearAll(); // Clear all data

//indexdb

const dbWrapper = new indexdb('myDatabase', 'myStore');

const newData = { name: 'John Doe', age: 30 };
dbWrapper.add(newData)
  .then(id => console.log(`Data added with id: ${id}`))
  .catch(error => console.error('Error adding data:', error));

dbWrapper.getAll()
  .then(data => console.log('All data:', data))
  .catch(error => console.error('Error getting data:', error));

const targetId = 1;
dbWrapper.getById(targetId)
  .then(data => console.log(`Data with id ${targetId}:`, data))
  .catch(error => console.error(`Error getting data with id ${targetId}:`, error));

const updateId = 1;
const updatedData = { age: 31 };
dbWrapper.update(updateId, updatedData)
  .then(() => console.log(`Data with id ${updateId} updated successfully`))
  .catch(error => console.error(`Error updating data with id ${updateId}:`, error));

const deleteId = 1;
dbWrapper.remove(deleteId)
  .then(() => console.log(`Data with id ${deleteId} deleted successfully`))
  .catch(error => console.error(`Error deleting data with id ${deleteId}:`, error));

```
npm package: @lite-embed/react
Description: Embed a YouTube or Vimeo video in your React app
Author: Daniel Esteves
Latest version: 1.0.4

# @lite-embed/react

This package hosts the React components to use with the lite-embed library.

## Installation

Install the package in your project directory with:

```sh
// with npm
npm install @lite-embed/react

// with yarn
yarn add @lite-embed/react
```

## Documentation

[The documentation](https://lite-embed.vercel.app/docs/react/quick-start)
npm package: @lite-embed/vue
Description: Embed a YouTube or Vimeo video in your Vue app
Author: Daniel Esteves
Latest version: 1.0.4

# @lite-embed/vue

This package hosts the Vue components to use with the lite-embed library.

## Installation

Install the package in your project directory with:

```sh
// with npm
npm install @lite-embed/vue

// with yarn
yarn add @lite-embed/vue
```

## Documentation

[The documentation](https://lite-embed.vercel.app/docs/vue/quick-start)