open-index/open-npm huggingface dataset:
npm package: @sennanetwork/uniswap-v2-sdk
Description: 🛠 An SDK for building applications on top of Uniswap.
Latest version: 3.0.5

# Uniswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/Uniswap/uniswap-sdk/workflows/CI/badge.svg)](https://github.com/Uniswap/uniswap-sdk)
[![npm version](https://img.shields.io/npm/v/@uniswap/sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/Uniswap/uniswap-sdk.git
```

Move into the uniswap-sdk working directory

```sh
cd uniswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @sennery/eslint-config
Description: sennery eslint config
Author: Arsenii Likhachev
Latest version: 0.4.1

# @sennery/eslint-config

My personal eslint config. Key features:

- TypeScript + Vue 3
- Single quotes
- No semicolons
- 2 spaces indent
- Dangling commas
- Sorted imports

## Usage
### Intall

Add `@sennery/eslint-config` to your project as development dependency:

```sh
pnpm add -D @sennery/eslint-config
```

### Config `.eslintrc`

Add `@sennery` to your eslint config for full TypeScript and Vue support:

```json
{
  "extends": "@sennery"
}
```

... or use separate configs:

- #### Config for TS 
  You have to set *ENV* variable `ESLINT_TSCONFIG` with location of TS config for type based linting (`tsconfig.eslint.json` - is searched by default). If there is no TS config - type based linting will not work

    ```json
    {
      "extends": "@sennery/eslint-config/typescript"
    }
    ```

- #### Config for Vue

    ```json
    {
      "extends": "@sennery/eslint-config/vue"
    }
    ```

- #### Basic config for JS (already included in all previous configs)

    ```json
    { 
      "extends": "@sennery/eslint-config/basic"
    }
    ```

### Eslint scripts

Add following eslint commands to your `package.json`:

```json
{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}
```

### Config auto fix

- #### VS Code

    Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and create `.vscode/settings.json`
    
    ```json
    {
      "prettier.enable": false,
      "editor.formatOnSave": false,
      "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
      }
    }
    ```

- #### WebStorm

    Open the settings (`Ctrl+Alt+S`) and go to `Languages & Frameworks` > `JavaScript` > `Code Quality Tools` > `ESLint`. Enable the following setting:


- [x] Run eslint --fix on save
npm package: @senntyou/canvas2image
Description: A tool of saving or converting canvas to images(download with file extension).
Author: senntyou
Latest version: 0.0.1

# Canvas to image.

A tool of saving or converting canvas to images(download with file extension).

Cloned from [https://github.com/hongru/canvas2image](https://github.com/hongru/canvas2image).

## 1. Load resources.

```
const Canvas2Image = require('@senntyou/canvas2image');

Canvas2Image.doSomething().
```

## 2. How to use.

```
Canvas2Image.saveAsImage(canvas, width, height, type);
Canvas2Image.saveAsPNG(canvas, width, height);
Canvas2Image.saveAsJPEG(canvas, width, height);
Canvas2Image.saveAsGIF(canvas, width, height);
Canvas2Image.saveAsBMP(canvas, width, height);

Canvas2Image.convertToImage(canvas, width, height, type);
Canvas2Image.convertToPNG(canvas, width, height);
Canvas2Image.convertToJPEG(canvas, width, height);
Canvas2Image.convertToGIF(canvas, width, height);
Canvas2Image.convertToBMP(canvas, width, height);
```

### 2.1 `saveAsImage`

Save a canvas as an image.

```
Canvas2Image.saveAsImage(canvas, width, height, type);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 
* `type`: `png|jpeg|gif|bmp`. 

### 2.2 `saveAsPNG`

Save a canvas as a png image.

```
Canvas2Image.saveAsPNG(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 

### 2.3 `saveAsJPEG`

Save a canvas as a jpeg image.

```
Canvas2Image.saveAsJPEG(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 

### 2.4 `saveAsGIF`

Save a canvas as a gif image.

```
Canvas2Image.saveAsGIF(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 

### 2.5 `saveAsBMP`

Save a canvas as a bmp image.

```
Canvas2Image.saveAsBMP(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 

### 2.6 `convertToImage`

Convert a canvas to an `img` element.

```
let img = Canvas2Image.convertToImage(canvas, width, height, type);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 
* `type`: `png|jpeg|gif|bmp`.

### 2.7 `convertToPNG`

Convert a canvas to an `img` element with a png image.

```
let img = Canvas2Image.convertToPNG(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height.  

### 2.8 `convertToJPEG`

Convert a canvas to an `img` element with a jpeg image.

```
let img = Canvas2Image.convertToJPEG(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 

### 2.9 `convertToGIF`

Convert a canvas to an `img` element with a gif image.

```
let img = Canvas2Image.convertToGIF(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height. 

### 2.10 `convertToBMP`

Convert a canvas to an `img` element with a bmp image.

```
let img = Canvas2Image.convertToBMP(canvas, width, height);
```

* `canvas`: Canvas instance. 
* `width`: Image Width. 
* `height`: Image Height.
npm package: @senntyou/shortcut.css
Description: A commonly used styles collection, margin, padding, border, width, height, font ...
Latest version: 3.0.0

# shortcut.css

一个通用的样式类集合, margin, padding, border, width, height, font ...

```
npm install @senntyou/shortcut.css --save
```

- `px`单位: `import '@senntyou/shortcut.css'`
- `rem`单位(屏宽 375): `import '@senntyou/shortcut.css/lib/shortcut.375rem.css'`
- `rem`单位(屏宽 750): `import '@senntyou/shortcut.css/lib/shortcut.750rem.css'`
- `vw`单位(屏宽 375): `import '@senntyou/shortcut.css/lib/shortcut.375vw.css'`
- `vw`单位(屏宽 750): `import '@senntyou/shortcut.css/lib/shortcut.750vw.css'`
- `rpx`单位(屏宽 750): `import '@senntyou/shortcut.css/lib/shortcut.750rpx.css'`

## 类名规则

1. 用 `-` 链接属性与值, 如果属性中已有 `-`, 则保留: `mg-l-10 -> margin-left: 10px`
2. 用 2 个辅音字母代替长单词, 用 1 个辅音字母代替短单词： `mg-l -> margin-left`
3. 如果值是整数, 则保留: `mg-10 -> margin: 10px`
4. 如果值是字符串, 则保留: `mg-auto -> margin: auto`
5. 如果值是小数, 则用 `-` 分割开: `l-hg-1-1 -> line-height: 1.1`
6. 用 `-` 连接特殊单位: `50-pc -> 50%`

## 简化类名规则

在一般的命名规则之上，另加一套简化的命名，比如

```
margin-top: 20px => mg-t-20 => mgt-20
margin-left: 10% => mg-l-10-pc => mgl-10p
```

1. 类名中只保留一个 `-`，属性名与属性值中的 `-` 都不保留
2. 对于 `0.x` 的小数，直接去掉 `.`；而 `1.x, 2.x` 等大于 1 的小数，则用横线代替 `.`
3. 使用简化单位

## 特殊单位

- `pc -> %`
- `p -> %`（简化）

## 缩写

1. `margin`:

   - `margin`: `mg`
   - `margin-left`: `mg-l`
   - `margin-top`: `mg-t`
   - `margin-right`: `mg-r`
   - `margin-bottom`: `mg-b`

2. `padding`:

   - `padding`: `pd`
   - `padding-left`: `pd-l`
   - `padding-top`: `pd-t`
   - `padding-right`: `pd-r`
   - `padding-bottom`: `pd-b`

3. `border`:

   - `border`: `bd`
   - `border-left`: `bd-l`
   - `border-top`: `bd-t`
   - `border-right`: `bd-r`
   - `border-bottom`: `bd-b`

4. `border-radius`:

   - `border-radius`: `bd-rd`
   - `border-top-left-radius`: `bd-rd-t-l`
   - `border-top-right-radius`: `bd-rd-t-r`
   - `border-bottom-left-radius`: `bd-rd-b-l`
   - `border-bottom-right-radius`: `bd-rd-b-r`

5. `line-height`: `l-hg`

6. `font-size`: `f-s`

7. `font-weight`: `f-wg`

8. `position`:

   - `left`: `l`
   - `right`: `r`
   - `top`: `t`
   - `bottom`: `b`

9. `width`: `wd`

10. `height`: `hg`

11. `float`: `fl`

12. `overflow`: `of`

13. `cursor`: `cs`

14. `position`: `ps`

15. `display`: `dp`

16. `flex`: `fx`

17. `text-align`: `t-a`
npm package: @senntyou/web-monitor-sdk
Description: 前端监控系统 JS SDK
Author: senntyou
Latest version: 0.1.1

# web-monitor-sdk

前端监控系统 JS SDK.

```
import { init } from '@senntyou/web-monitor-sdk';

init({server, maxReports, checkInterval});
```

- `server`: `String` `default: ''` 服务器域名配置
- `maxReports`: `Number` `default: 50` 最大上报错误个数
- `checkInterval`: `Number` `default: 10000` 每隔多久检查一次是否有错误需要上报（毫秒）

```
import { reportError } from '@senntyou/web-monitor-sdk';

// 手动上报错误
new Promise(resolve => {
  console.log(lala.lele);
  resolve(1);
}).catch(error => {
  console.error(error);
  reportError(error);
});
```
npm package: @senojs/eslint-config
Description: eslint config
Author: htmlin
Latest version: 0.7.0

# `@senojs/eslint-config`

> ESLint config

## Usage

To use our config, import the package inside of an `eslint.config.js` file and add it into the exported array using `extends`, like this:

```js
import senoESLintConfig from '@senojs/eslint-config'
import { defineConfig } from 'eslint/config'

export default defineConfig([
  {
    extends: [senoESLintConfig],

    // anything from here will override myconfig
    rules: {
      'no-unused-vars': 'warn',
    },
  },
])
```
npm package: @senojs/prettier-config
Description: prettier config
Author: htmlin
Latest version: 0.7.0

# `@senojs/prettier-config`

> prettier config

## Usage

Reference it in your `package.json`:

```json
{
  "name": "your-cool-library",
  "version": "1.0.0",
  "prettier": "@senojs/prettier-config"
}
```

If you don’t want to use `package.json`, or if you need to extend the configuration to overwrite some properties from our configuration, import the file in a `.prettierrc.js` file and export the modifications, e.g:

```js
import senoPrettierConfig from '@senojs/prettier-config'

export default {
  ...senoPrettierConfig,
  printWidth: 120,
}
```
npm package: @senojs/rollup-plugin-style-inject
Description: rollup-plugin-style-inject
Author: htmlin
Latest version: 0.2.3

# @senojs/rollup-plugin-style-inject

Inject style to document head.

## Usage

```js
// vite.config.js
import styleInject from '@senojs/rollup-plugin-style-inject'

export default {
  plugins: [
    styleInject({
      insertAt: 'top',
    }),
  ],
}
```

## Options

### `insertAt`

- Type: `string`
- Default: `'top'`

Insert `<style>` tag to specific position of `<head>` element.
npm package: @sensate/gateway
Description: Gateway support for the sensate bot framework.
Author: Nico Hämäläinen
Latest version: 0.0.2

# @sensate/gateway [![Build][travis-image]][travis-url] [![Coverage][cov-image]][cov-url] [![NPM][npm-image]][npm-url]

> Package for building sensate gateways for different services.

## Features

To be written.

[npm-url]: https://npmjs.org/package/sensate
[npm-image]: http://img.shields.io/npm/v/sensate.svg
[travis-url]: http://travis-ci.org/sensate-framework/gateway
[travis-image]: http://travis-ci.org/sensate-framework/gateway.svg?branch=master
[cov-url]: https://codecov.io/gh/sensate/gateway
[cov-image]: https://codecov.io/gh/sensate-framework/gateway/branch/master/graph/badge.svg
npm package: @sensate/gateway-discord
Description: Discord gateway for the sensate bot framework.
Author: Nico Hämäläinen
Latest version: 0.0.1

# @sensate/gateway-discord [![Build][travis-image]][travis-url] [![Coverage][cov-image]][cov-url] [![NPM][npm-image]][npm-url]

> Discord gateway for the sensate bot framework.

# Tasks

- [x] Connects to Discord
- [x] Receiving and sending text messages
- [ ] ?

## Contributing

Please open any issues or send pull requests and I will look through them.

[npm-url]: https://npmjs.org/package/@sensate/gateway-discord
[npm-image]: http://img.shields.io/npm/v/@sensate/gateway-discord.svg
[travis-url]: http://travis-ci.org/sensate-framework/gateway-discord
[travis-image]: http://travis-ci.org/sensate-framework/gateway-discord.svg?branch=master
[cov-url]: https://codecov.io/gh/sensate-framework/gateway-discord
[cov-image]: https://codecov.io/gh/sensate-framework/gateway-discord/branch/master/graph/badge.svg
npm package: @sensate/sensate
Description: An extensible bot framework that makes sense.
Author: Nico Hämäläinen
Latest version: 0.0.2

# sensate [![Build][travis-image]][travis-url] [![Coverage][cov-image]][cov-url] [![NPM][npm-image]][npm-url]

> The no tears extensible bot framework.

## Features

### Gateways

Gateways are objects that manage the connection and communication with an online service. They're used to send, receive and handle messages.

#### Example Gateways

Our current roadmap for gateways is as follows:

- [ ] IRC
- [ ] Slack
- [ ] Discord
- [ ] Facebook Messenger
- [ ] Telegram
- [ ] Twilio

### Agents

Agents are objects that namespace one or more command listeners for a Sensate. You can think of them as plugins, but they're more like collections of plugins.

#### Example Agents

- Toggl: Providing a variety of commands for creating, listing and tracking time entries.
- Dictionary: Providing synonyms, antonyms, definitions etc. for given words.
- IMDB: Providing information about actors, movies, directors etc.
- Random: Providing dice rolls, random generated names, colors, etc.

## Contributing

Please open any issues or pull requests and I will look through them once I have the time. I'm open to most contributions but can be a bit picky about coding styles.

[npm-url]: https://npmjs.org/package/sensate
[npm-image]: http://img.shields.io/npm/v/sensate.svg
[travis-url]: http://travis-ci.org/clooth/sensate
[travis-image]: http://travis-ci.org/clooth/sensate.svg?branch=master
[cov-url]: https://codecov.io/gh/clooth/sensate
[cov-image]: https://codecov.io/gh/clooth/sensate/branch/master/graph/badge.svg
npm package: @sensative/jsep-eval
Description: A configurable eval function, which uses jsep to parse expressions. The generated result is evaluated w.r.t. a supplied object context.
Author: Fredrik Carlsson
Latest version: 1.0.1

## jsep-eval: evaluate javascript expressions

jsep-eval evaluates javascript expressions, and uses [jsep](http://jsep.from.so/) to parse the expressions. A context can/should be supplied against which identifers are matched.


### Usage

#### Node.JS
First, run `npm install jsep-eval`. Then, in your source file:
```javascript
const jsepEval = require("jsep-eval");
const evaluate = jsepEval.evaluate;
const two = evaluate('1 + 1');
const three = evaluate('two + 1', {two: 2});
```
#### Configure evaluation restrictively
jsep-eval exposes the objects the allowed expression types
```javascript
const types = jsepEval.types;
```
So it is possible to dis-allow a given expression type by removing it from this array:
```javascript
const types = jsepEval.types;
evaluate('2 + 2'); // returns 4
delete types.BINARY;
evaluate('2 + 2'); // throws error
```
It is also possible to restrict evaluation by operator (both binary and unary):
```javascript
const binaryOps = jsepEval.operators.binary;
const unaryOps = jsepEval.operators.unary;

evaluate('2 === 2'); // returns true
delete binaryOps['==='];
evaluate('2 === 2'); // throws error

evaluate('!false'); // returns true
unaryOps['!'] = () => 'bob';
evaluate('!false'); // returns 'bob'
```

### License
jsep-eval is under the MIT license. See LICENSE file.