open-index/open-npm huggingface dataset:
npm package: @0x1luxa/utils
Description: A collection of utility functions
Author: 0x1luxa
Latest version: 0.2.22

# @0x1luxa/utils

A collection of utility functions for various common tasks, including formatting values, handling dates, and interacting with web3.

## Installation

To install the package, use npm:

```bash
npm install @0x1luxa/utils
```

## Usage

### Formatting Utilities

#### Format USD Value

Formats a number to a USD currency string.

```typescript
import { formatUsdValue } from "@0x1luxa/utils"

const formattedValue = formatUsdValue(1234.56)
console.log(formattedValue) // "$1,234.56"
```

#### Format Percent Value

Formats a number to a percentage string.

```typescript
import { formatPercentValue } from "@0x1luxa/utils"

const formattedPercent = formatPercentValue(0.1234)
console.log(formattedPercent) // "12.34%"
```

### Date Utilities

#### Get Days Ago

Calculates how many days ago a given date was.

```typescript
import { getDaysAgo } from "@0x1luxa/utils"

const daysAgo = getDaysAgo("2023-01-01")
console.log(daysAgo) // e.g., "9 months ago"
```

### Web3 Utilities

#### Shorten Address

Shortens an Ethereum address for display purposes.

```typescript
import { shortenAddress } from "@0x1luxa/utils"

const shortAddress = shortenAddress(
  "0x1234567890abcdef1234567890abcdef12345678"
)
console.log(shortAddress) // "0x1234...5678"
```

#### Parse RPC Error

Parses an RPC error to extract useful information.

```typescript
import { parseRpcError } from "@0x1luxa/utils"

const error = new Error("Transaction reverted")
const parsedError = parseRpcError(error)
console.log(parsedError.revertReason) // "Transaction reverted"
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.

## License

This project is licensed under the MIT License.
npm package: @0x2e757/wrappers
Description: Variable wrapper typescript library, transpiled to ESNext JavaScript
Author: Eric Kevrel
Latest version: 3.0.1

# Wrappers

TypeScript variable wrapper library, transpiled to ESNext JavaScript.

## Install

```bash
npm i @0x2e757/wrappers
```

## Usage

### StaticWrapper

Simple wrapper that can be used as a value container. Has derived `LocalStorageWrapper` and `SessionStorageWrapper` implementation that read and save their values to corresponding storages.

#### Usage example:

```typescript
import { StaticWrapper } from "@0x2e757/Wrappers";

const wNumber = new StaticWrapper(0);
wNumber.subscribe(console.log);

wNumber.value = 1;
wNumber.value = 2;
wNumber.value += 3;
```

#### Console output:

```
1
2
5
```

### DynamicWrapper

Advanced wrapper which contains dynamically computed value (it can not be set manually). Values are being computed only before they are going to be used.

#### Usage example:

```typescript
import { StaticWrapper, DynamicWrapper } from "@0x2e757/Wrappers";

const wUsername = new StaticWrapper("John");
const wBalance = new StaticWrapper(100);

const wAccountInfo = new DynamicWrapper(() => `${wUsername.value} has ${wBalance.value}$.`);
wAccountInfo.subscribe(console.log);

wBalance.value -= 50;
```

#### Console output:

```
John has 50$.
```

### Generic Wrapper

Helper class that dynamically will return either `StaticWrapper` or `DynamicWrapper`, depending on value type (is function or not) passed to the constructor.

#### Usage example:

```TypeScript
import { Wrapper } from "@0x2e757/Wrappers";

const staticWrapper = new Wrapper(0);
const dynamicWrapper = new Wrapper(() => staticWrapper.value * 2);
dynamicWrapper.subscribe(console.log);

staticWrapper.value = 5;
```

#### Console output:

```
10
```
npm package: @0x3175/show
Description: English dictionary in the shell.
Latest version: 1.0.0

# [show](https://www.npmjs.com/package/@0x3175/show)

English dictionary in the shell.

## Installation

```bash
npm i -g @0x3175/show
```

## Usage

```bash
$ show hello

hello  [ /həˈləʊ/ ]

- [noun] "Hello!" or an equivalent greeting.

- [verb] To greet with "hello".

- [interjection] A greeting (salutation) said when meeting someone or acknowledging someone’s arrival or presence.
  Hello, everyone.

```

## License

[MIT](https://choosealicense.com/licenses/mit/)

## Credits

[googleDictionaryAPI](https://github.com/meetDeveloper/googleDictionaryAPI) is used.