open-index/open-npm huggingface dataset:
npm package: @skavinvarnan/cryptlib
Description: cryptlib uses AES 256 for encryption or decryption. This library can be used for encryption and decryption of strings using Node on iOS and Android
Author: Kavin Varnan
Latest version: 1.0.3

# cryptlib

A module to encrypt/decrypt string in Node, written in ES6.

Using companion framework libraries, you should be able to encrypt/decrypt between node, iOS and Android.

Companion libs can be found here: [Cross Platform AES Encryption](https://github.com/skavinvarnan/Cross-Platform-AES)


## Installation

`npm install @skavinvarnan/cryptlib --save`

## Usage

### Encrypt Decrypt with Random IV
In this mode the library will internally create a random IV while encryption and while decryption it will ignore the initial vector chars. **This will always create a different cipherText for the same plain text and key**

```javascript
const plainText = "this is my plain text";
const key = "your key";

const cryptLib = require('@skavinvarnan/cryptlib');

const cipherText = cryptLib.encryptPlainTextWithRandomIV(plainText, key);
console.log('cipherText %s', cipherText);

const decryptedString = cryptLib.decryptCipherTextWithRandomIV(cipherText, key);
console.log('decryptedString %s', decryptedString);
```

### Basic Encrypt Decrypt

```javascript
const cryptLib = require('@skavinvarnan/cryptlib');
const iv = cryptLib.generateRandomIV(16); //16 bytes = 128 bit
const key = cryptLib.getHashSha256('my secret key', 32); //32 bytes = 256 bits
const cipherText = cryptLib.encrypt('This is the text to be encrypted', key, iv);

console.log(cipherText);

const decryptedString = cryptLib.decrypt(cipherText, key, iv);

console.log(decryptedString);
```


## Run Code Sample

`npm start`

## Tests

`npm test`

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.


## License

MIT license; see [LICENSE](./LICENSE).

(c) 2018 by Kavin Varnan
npm package: @skavl-media/next-sanity
Description: Sanity utilities for Skavl Media projects
Latest version: 1.2.1

# @skavl-media/sanity

A lightweight Sanity.io client library for making queries and mutations in Next.js applications.

## Installation

```zsh
npm install @skavl-media/sanity
```

### Peer Dependencies

This package requires the following peer dependencies:

```zsh
npm install next@^15.0.0 next-sanity@^9.0.0
```

## Usage

### Initialize Environment Variables

First, set up the required environment variables in your `.env` file:

```env
NEXT_PUBLIC_SANITY_PROJECT_ID="your-project-id"
NEXT_PUBLIC_SANITY_DATASET="production"
NEXT_PUBLIC_SANITY_API_VERSION="2024-11-21"
NEXT_PUBLIC_SANITY_STUDIO_URL="https://your-studio-url"
SANITY_API_TOKEN="your-api-token" # Required for draft mode
```

### Using sanityFetch

`sanityFetch` is a server-side function that handles both published and draft content:

```typescript
import { sanityFetch } from '@skavl-media/sanity';

// In a Server Component
async function getData() {
  const posts = await sanityFetch<Post[]>({
    query: `*[_type == "post"]`,
    // Optional parameters
    params: { limit: 10 },
    // Cache for 60 seconds (default)
    revalidate: 60,
    // Optional tags for on-demand revalidation
    tags: ['posts'],
  });

  return posts;
}
```

#### Features:

- Type-safe queries with generics
- Automatic draft mode handling
- Configurable caching with `revalidate`
- Tag-based revalidation support
- Stega-enabled preview mode

### Using sanityClient

For direct client access (useful for mutations or client-side queries):

```typescript
import { sanityClient } from '@skavl-media/sanity';

// Example mutation
async function createPost(data: PostData) {
  return sanityClient.create({
    _type: 'post',
    ...data,
  });
}

// Example query
async function getPosts() {
  return sanityClient.fetch(`*[_type == "post"]`);
}
```

### Caching Behavior

- Default cache duration: 60 seconds
- Draft mode: No caching (revalidate: 0)
- With tags: Infinite cache until manually revalidated
- Custom cache duration: Set via `revalidate` parameter

### Draft Mode

The package automatically handles draft mode when enabled in your Next.js application. In draft mode:

- Caching is disabled
- Preview drafts are visible
- Stega is enabled for visual editing
- Requires `SANITY_API_TOKEN` environment variable

### On-Demand Revalidation

When using tags, you can revalidate content on-demand:

## License

MIT

## Repository

[GitHub Repository](https://github.com/skavl-media/sanity)

## Keywords

- sanity
- next.js
- skavlmedia
npm package: @skavl-media/sanity
Description: Sanity utilities for Skavl Media projects
Latest version: 1.0.6

# @skavl-media/sanity

A lightweight Sanity.io client library for making queries and mutations in Next.js applications.

## Installation

```zsh
npm install @skavl-media/sanity
```

### Peer Dependencies

This package requires the following peer dependencies:

```zsh
npm install next@^15.0.0 next-sanity@^9.0.0
```

## Usage

### Initialize Environment Variables

First, set up the required environment variables in your `.env` file:

```env
NEXT_PUBLIC_SANITY_PROJECT_ID="your-project-id"
NEXT_PUBLIC_SANITY_DATASET="production"
NEXT_PUBLIC_SANITY_API_VERSION="2024-11-21"
NEXT_PUBLIC_SANITY_STUDIO_URL="https://your-studio-url"
SANITY_API_TOKEN="your-api-token" # Required for draft mode
```

### Using sanityFetch

`sanityFetch` is a server-side function that handles both published and draft content:

```typescript
import { sanityFetch } from '@skavl-media/sanity';

// In a Server Component
async function getData() {
  const posts = await sanityFetch<Post[]>({
    query: `*[_type == "post"]`,
    // Optional parameters
    params: { limit: 10 },
    // Cache for 60 seconds (default)
    revalidate: 60,
    // Optional tags for on-demand revalidation
    tags: ['posts'],
  });

  return posts;
}
```

#### Features:

- Type-safe queries with generics
- Automatic draft mode handling
- Configurable caching with `revalidate`
- Tag-based revalidation support
- Stega-enabled preview mode

### Using sanityClient

For direct client access (useful for mutations or client-side queries):

```typescript
import { sanityClient } from '@skavl-media/sanity';

// Example mutation
async function createPost(data: PostData) {
  return sanityClient.create({
    _type: 'post',
    ...data,
  });
}

// Example query
async function getPosts() {
  return sanityClient.fetch(`*[_type == "post"]`);
}
```

### Caching Behavior

- Default cache duration: 60 seconds
- Draft mode: No caching (revalidate: 0)
- With tags: Infinite cache until manually revalidated
- Custom cache duration: Set via `revalidate` parameter

### Draft Mode

The package automatically handles draft mode when enabled in your Next.js application. In draft mode:

- Caching is disabled
- Preview drafts are visible
- Stega is enabled for visual editing
- Requires `SANITY_API_TOKEN` environment variable

### On-Demand Revalidation

When using tags, you can revalidate content on-demand:

## License

MIT

## Repository

[GitHub Repository](https://github.com/skavl-media/sanity)

## Keywords

- sanity
- next.js
- skavlmedia
npm package: @skawr/search
Description: Official SKAWR browser search SDK — lightweight, search-only client
Latest version: 0.1.0

# @skawr/search

Official SKAWR browser search SDK — lightweight, search-only client safe for frontend use.

## Installation

```bash
npm install @skawr/search
```

ESM only. ~1.7 KB minified. Zero runtime dependencies.

## Quick Start

```typescript
import { SkawrSearch } from '@skawr/search';

const search = new SkawrSearch({
  publicKey: 'your-public-key',
  baseUrl: 'https://api.skawr.com', // optional
});
```

## Usage

### Search

```typescript
const results = await search.search('laptop', {
  filters: { category: 'electronics', min_price: 100 },
  page: 1,
  per_page: 20,
  sort_by: 'relevance',
});

console.log(results.total_results);
results.results.forEach((item) => {
  console.log(item.title, item.price);
});
```

### Suggestions

```typescript
const suggestions = await search.suggest('lap', {
  include_trending: true,
  limit: 10,
});

console.log(suggestions.query_completions); // ['laptop', 'laptop bag', ...]
console.log(suggestions.trending_queries);  // ['phone', 'tablet', ...]
```

### Autocomplete

```typescript
const { suggestions } = await search.autocomplete('lap', { limit: 5 });
console.log(suggestions); // ['laptop', 'laptop case', 'laptop stand']
```

## Configuration

| Option | Type | Default | Description |
|---|---|---|---|
| `publicKey` | `string` | *required* | Your SKAWR public/search key |
| `baseUrl` | `string` | `https://api.skawr.com` | API base URL |
| `timeout` | `number` | `10000` | Request timeout in ms |

## Error Handling

```typescript
import { SearchError } from '@skawr/search';

try {
  await search.search('test');
} catch (error) {
  if (error instanceof SearchError) {
    console.log(error.status); // HTTP status code
    console.log(error.detail); // Error message from API
  }
}
```

## Browser Support

Works in all modern browsers with native `fetch` support (Chrome 42+, Firefox 39+, Safari 10.1+, Edge 14+).

## License

MIT
npm package: @skax/camel
Description: ![build](https://github.com/freeshineit/skax-camel/workflows/build/badge.svg) ![Download](https://img.shields.io/npm/dm/@skax/camel.svg) ![Version](https://img.shields.io/npm/v/@skax/camel.svg) ![License](https://img.shields.io/npm/l/@skax/camel.svg)
Author: ShineShao
Latest version: 0.2.8

## @skax/camel

![build](https://github.com/freeshineit/skax-camel/workflows/build/badge.svg)
![Download](https://img.shields.io/npm/dm/@skax/camel.svg)
![Version](https://img.shields.io/npm/v/@skax/camel.svg)
![License](https://img.shields.io/npm/l/@skax/camel.svg)



A set of utility functions commonly.

### example

```ts
import {lowerCamel, upperCamel} from '@skax/camel'

lowerCamel("abcce_dddd_ffff") // -> abcceDdddFfff

lowerCamel("abcce-dddd-ffff", '-') // -> abcceDdddFfff

upperCamel("abcce_dddd_ffff") // -> AbcceDdddFfff

upperCamel("abcce-dddd-ffff", '-') // -> AbcceDdddFfff
```