open-index/open-npm huggingface dataset:
npm package: @niyojs/logger
Description: Custom console API with extended functionality.
Author: Mehmet Niyazi Yarar
Latest version: 0.0.2

# README

A custom console API which provides conditional logging and the capability of storing logs in various environments.

```ts
import { Logger, LogStorage } from '@niyojs/logger'

const logger = Logger.create({
  // Origin
  src: 'my-module',
  // Print log messages to the console
  // if the log level of the message is "debug" and below
  level: 'debug',
  storages: [
    new LogStorage({
      // Store log messages if the log level of the message is "warn" and below
      level: 'warn',
      fn: entry => {
        // Your custom function to store log
        // Runs synchronously
      }
    })
  ]
})

// or
const logger = Logger.create({ src: 'example', level: 'info' }).add(
  yourStoragePlugin({
    // ...parameters
  })
)
```

Below methods can be used for logging in addition to the standard console methods (debug, error, info, warn, trace):

- **fatal**: Critical errors (`console.error`)
- **todo**: Todo messages (`console.warn`)
- **success**: Success messages (`console.info`)
- **newline**: Prints new lines to the console

## Levels

Default log levels:

| Level   | Severity | Description      |
| ------- | -------- | ---------------- |
| off     | 0        | Silent mode      |
| fatal   | 1        | Critical errors  |
| error   | 2        | Errors           |
| success | 3        | Success messages |
| info    | 4        | Info messages    |
| todo    | 5        | To-do messages   |
| warn    | 6        | Warnings         |
| debug   | 7        | Debugging        |
| trace   | 8        | Tracing          |

Log levels can be customized via:

```tsx
import { setLogLevels } from '@niyojs/logger'
setLogLevels({
  // Your custom log levels
})
```

## Styles

The messages are printed to the console with styles. See `DEFAULT_NODE_STYLES` (chalk) and `DEFAULT_BROWSER_STYLES` (css) for their default values.

Log styles can be customized via:

```tsx
import { setNodeStyles, setBrowserStyles } from '@niyojs/logger'
setNodeStyles({
  // Your custom log levels
})
setBrowserStyles({
  // Your custom log levels
})
```

## Storages

See [this example](/packages/logger/examples/file-storage.ts) to see how log messages are saved to the files.

> You may run all the examples via `yarn --cwd packages/logger eg` command.
npm package: @nizaglobal/default-token-list
Description: Niza Global default token list
Author: Niza Global
Latest version: 4.1.66

# Niza Global Token List

Official token list of [Niza Global](https://Niza Global.org).

## Contributing

To add a token to Niza Global:

1. Fork the repo so that you can push edits to a version of this repo that you have write permissions to. See [docs](https://docs.github.com/en/get-started/quickstart/fork-a-repo) for more details.
2. Clone the repo. See [docs](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) for more details.
3. Enter the repo via `cd default-token-list`.
4. Install dependencies via `yarn install`. Note: you must be on Node.js 14.x or later to do this.
5. Add your token's logo to `assets/` (it must be a PNG less than 200px by 200px or an svg). If your token symbol is TEST, your asset must be named TEST.png.
6. Add your token to `src/<network>.token-list.json`, where `<network>` is the name of the network your token is deployed to.
7. Run `yarn build` to regenerate the main token list.
8. Submit a pull request. See [docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) for more details

### resizing

Recommend the squoosh-cli.
`yarn squoosh-cli --output-dir tmp/resized --resize '{width: 200}' --oxipng auto assets/asset_cETH.png`

In certain cases such as if the proportions are not square or if automatic resize results in a larger file size than the orginal you will need to resize with another tool or re export from your graphics app.

## License

MIT

# default-token-list

# default-token-list

# default-token-list
npm package: @nizaglobal/eslint-config
Description: Niza Global ESLint config
Latest version: 0.0.3

# @nizaglobal/eslint-config

Niza Global ESLint config to enforce coding standards and best practices.
This is forked from `@uniswap/eslint-config`

- TypeScript and Jest support
- Seamless Prettier integration
- Separate environments for Node.js and React

## Installation

It's already in the monorepo, just add to package.json devDependencies:

```
  "@nizaglobal/eslint-config": "workspace:^"
```

## Usage

For react-native based apps and packages:

```js
module.exports = {
  extends: ['@nizaglobal/eslint-config/native'],
}
```

For web-only apps:

Make sure to include `require('@nizaglobal/eslint-config/load')` at the top of your ESLint config. This loads a `@rushstack/eslint-patch/modern-module-resolution` patch so that ESLint loads any plugins installed by this package. 

```js
require('@nizaglobal/eslint-config/load')

module.exports = {
  extends: '@nizaglobal/eslint-config/node'
}
```

or:

```js
require('@nizaglobal/eslint-config/load')

module.exports = {
  extends: '@nizaglobal/eslint-config/react'
}
```

#### VSCode

If you're a VSCode user, consider installing the official [ESLint plugin](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and copying [`./.vscode/settings.json`](.vscode/settings.json#L1-L6) to your own `.vscode/settings.json` configuration file. This will automatically run `eslint --fix` on save.
npm package: @nizaglobal/uniswapx-sdk
Description: SDK for the UniswapX protocol
Author: Uniswap
Latest version: 1.0.1

# uniswapx-sdk

SDK for the UniswapX protocol

## Usage

The SDK contains bindings for two main flows: parsing serialized orders & building new orders.

### Building & Signing Orders

```ts
import { DutchOrder, NonceManager } from '@uniswap/uniswapx-sdk';
import { ethers } from 'ethers';

const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
const account = await provider.getSigner().getAddress(); 
const nonceMgr = new NonceManager(provider, 1); 
const nonce = await nonceMgr.useNonce(account); 

const chainId = 1;
const builder = new DutchOrderBuilder(chainId);
const order = builder
  .deadline(deadline)
  .decayEndTime(deadline)
  .decayStartTime(deadline - 100)
  .nonce(nonce)
  .input({
    token: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    amount: BigNumber.from('1000000'),
  })
  .output({
    token: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
    startAmount: BigNumber.from('1000000000000000000'),
    endAmount: BigNumber.from('900000000000000000'),
    recipient: '0x0000000000000000000000000000000000000000',
  })
  .build();
 
// Sign the built order 
const { domain, types, values } = order.permitData();
const signature = wallet._signTypedData(domain, types, values);

const serializedOrder = order.serialize();
// submit serializedOrder and signature to order pool
```

### Parsing Orders
```ts
import { DutchOrder, Order } from '@uniswap/uniswapx-sdk';

const serializedOrder = '0x1111222233334444555500000000234300234...';
const chainId = 1; 

const order: Order = DutchOrder.parse(serializedOrder, chainId);

const orderData = order.info;
const orderHash = order.hash();
```
### Validating Orders 
```ts
import { ethers } from 'ethers';
import { OrderValidator } from 'uniswapx-sdk';

const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
const validator = new OrderValidator(provider, CHAIN_ID); 
const orders: SignedOrder[] = [
  {
    order: order1, 
    signature: signature1
  }, 
  {
    order: order2, 
    signature: signature2
  }
]; 

try {
  const statusList: OrderValidation[] = await validator.validateBatch(orders); 
  // Do something with list of statuses 
}
catch(e) {
  // Handle error
}

```

### Order Object

**serialize()**

Returns an abi-encoded serialization of the order. This serialized format is passed into the corresponding reactor contract for execution.


**getSigner(signature)**

Recovers the address which created the given signature over the order. Used to determine the order maker.


**permitData()**

Returns the domain, types, and values used to generate an EIP-712 signature over the order. Note that this signature both approves the release of the order's input tokens _and_ the execution of the order itself.


**hash()**

Returns the order hash. This is used as a key to track order fulfillment on-chain. It may also be useful as a unique order identifier for off-chain purposes.
npm package: @nizaglobal/v2-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 1.0.2

# Uniswap V2 SDK

[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).
npm package: @nizar-repo/key-typing-tracker
Description: Undo and redo features for typing text!
Latest version: 1.0.2

# key-typing-tracker

This is a library that provides a class to track the typing events on the keyboard by storing the adds and deletions in an events array and then using the undo and redo to make use of its tracker feature.

## Usage example

```ts
const typingEventTracker = new TypingEventTracker();

typingEventTracker.add("Hello,");
typingEventTracker.add("Im");
typingEventTracker.get(); // "Hello, Im"

typingEventTracker.add("new");
typingEventTracker.add("here!");
typingEventTracker.get(); // "Hello, Im new here!"

typingEventTracker.undo();
typingEventTracker.get(); // "Hello, Im new"

typingEventTracker.redo();
typingEventTracker.get(); // "Hello, Im new here!"

typingEventTracker.undo();
typingEventTracker.add("there!");
typingEventTracker.get(); // "Hello, Im new there!"
typingEventTracker.redo(); // Once add or delete methods are called the undone events will be deleted and thus loosing all preceding trace

typingEventTracker.get(); // "Hello, Im new there!"
typingEventTracker.delete(7); // deletes the last 7 characters of the words inserted "w"=1 + "there!"=6
typingEventTracker.get(); // "Hello, Im ne"
typingEventTracker.undo();
typingEventTracker.get(); // "Hello, Im new there!"
```