open-index/open-npm huggingface dataset:
npm package: @pintswapv3/sdk
Description: 🛠 An SDK for building applications on top of Pinkswap.
Latest version: 5.8.8

# PinkSwap SDK (Deprecated)

Forked from the [Uniswap SDK](https://github.com/Uniswap/uniswap-v2-sdk/commit/a88048e9c4198a5bdaea00883ca00c8c8e582605).

You can refer to the Uniswap SDK documentation [uniswap.org](https://docs.uniswap.org/sdk/2.0.0/).

## Running tests

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

First clone the repository:

```sh
git clone https://github.com/pinkswap/pink-swap-sdk.git
```

Move into the pinkswap-sdk working directory

```sh
cd pinkswap-sdk/
```

Install dependencies

```sh
pnpm install
```

Run tests

```sh
pnpm test
```

You should see output like the following:

```sh
pnpm 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: @pinuts/eslint-config-pinuts-base
Description: Common Eslint config for our Javascript.
Latest version: 2.4.1

# @pinuts/eslint-config-pinuts-base
Common Eslint config for our Javascript.


# Publish on npm

On master, once all the changes for a new version are in order, run:

1. `npm version [major|minor|patch]`
2. `git push origin master --follow-tags`
3. `npm publish`
npm package: @pinuts/eslint-config-pinuts-um
Description: Common Eslint config for our new (ES6 and beyond) UM / CSE Javascript.
Latest version: 1.1.1

# @pinuts/eslint-config-pinuts-um
Common Eslint config for our new (ES6 and beyond) UM / CSE Javascript.

Extends `@pinuts/eslint-config-pinuts-base`.


# Use in your project

Install or update node package:
```
sudo npm i -g @pinuts/eslint-config-pinuts-um
```

Include in your `cmsbs-conf/.eslintrc.js`:

```
module.exports = {
    extends: [
        '@pinuts/eslint-config-pinuts-um'
    ]
};
```

# Publish on npm

On master, once all the changes for a new version are in order, run:

1. `npm version [major|minor|patch]`
2. `git push origin master --follow-tags`
3. `npm publish`
npm package: @pinuts/eslint-config-pinuts-um-legacy
Description: Common Eslint config for our legacy (pre ES6) UM / CSE Javascript.
Latest version: 2.0.0

# @pinuts/eslint-config-pinuts-um-legacy
Common Eslint config for our legacy (pre ES6) UM / CSE Javascript.

Extends `@pinuts/eslint-config-pinuts-base` but with lesser strict rules.


# Use in your project

Install or update node package:
```
sudo npm i -g @pinuts/eslint-config-pinuts-um-legacy
```

Include in your `cmsbs-conf/.eslintrc.js`:

```
module.exports = {
    extends: [
        '@pinuts/eslint-config-pinuts-um-legacy'
    ]
};
```

# Publish on npm

On master, once all the changes for a new version are in order, run:

1. `npm version [major|minor|patch]`
2. `git push origin master --follow-tags`
3. `npm publish`
npm package: @pinweb/components
Description: ```bash $ git clone git@github.com:NervJS/taro.git $ cd taro ```
Latest version: 3.0.0-alpha.9

## Development

```bash
$ git clone git@github.com:NervJS/taro.git
$ cd taro
```

## License

MIT License

Copyright (c) O2Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## Open Source Software Licensed Under the MIT License: 

[m-pull-to-refresh](https://github.com/react-component/m-pull-to-refresh)
npm package: @pinwheel/react-modal
Description: React package for Pinwheel modal
Author: roscioli
Latest version: 3.5.1

# @pinwheel/react-modal

> React package for Pinwheel modal

[![NPM](https://img.shields.io/npm/v/@pinwheel/react-modal.svg)](https://www.npmjs.com/package/@pinwheel/react-modal) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @pinwheel/react-modal
```

## Usage

```jsx
import PinwheelModal from '@pinwheel/react-modal'

const App = () => {
  return <PinwheelModal open={true} linkToken={token} onEvent={console.log} />
}
```

In order to utilize the pinwheel iframe with the security policies enforced. (Recommended for production)

```jsx
import PinwheelModal from '@pinwheel/react-modal'

const App = () => {
  return (
    <PinwheelModal
      open={true}
      useSecureOrigin
      linkToken={token}
      onEvent={console.log}
    />
  )
}
```

All available React props are listed [here](https://docs.pinwheelapi.com/public/docs/link-getting-started#initialize-modal).

Please consult [our docs](https://docs.pinwheelapi.com/public/docs/react) for more information.

## Quick Start

You may want to explore the usage of the modal locally.

Start by going to the [customer dashboard](https://dashboard.getpinwheel.com/test-console) to create a token. Copy the token string. Then

```sh
# Build the @pinwheel/react-modal package
npm i
npm run build
# Run the example app
cd example
npm i
npm start
# Go to localhost:9000?token=<PASTE YOUR GENERATED TOKEN HERE>
```

## License

MIT ©
Pinwheel React Modal is available under the MIT license. See the LICENSE file for more info.
npm package: @pinyin/list-view
Description: A list view with animation & virtualization support.
Author: Bo Bao
Latest version: 0.0.11

# list-view

[![Build Status](https://travis-ci.com/pinyin/list-view.svg?branch=master)](https://travis-ci.com/pinyin/list-view)

A list view with animation &amp; virtualization support.

## Install 

`npm install @pinyin/list-view --save`

[Demo](http://pinyin.github.io/list-view/)

## Usage

``` typescript jsx
import {ListView} from '@pinyin/list-view'

<ListView range={{from: xxx, to: xxx}}>
// Elements
</ListView>
```

The `<ListView>` component roughly accepts the same props as a `div`, with a few differences.

For more information, please see the [source code of the demo](https://github.com/pinyin/list-view/blob/master/demo/Demo.tsx).

## Limits

Some passed styles will be ignored.

## Demo

[Infinite scrolling component implemented with this component](http://pinyin.github.io/list-view/)

Or clone this repo and run `npm run demo` at its root directory to open a local demo.

## License

MIT
npm package: @pinyin/map-object
Description: Recursively map over object keys
Author: Bo Bao
Latest version: 0.0.2

# map-object

[![Build Status](https://travis-ci.com/pinyin/map-object.svg?branch=master)](https://travis-ci.com/pinyin/map-object)


Recursively map over object keys.

Potential usage:
- serialization &amp; deserialization
- simple immutable data library

Please refer to [test](./src/mapObject.test.ts) for usage.

Any contributions are welcome.
npm package: @pinyin/measure
Description: React component for measuring the size of a Component
Author: Bo Bao
Latest version: 0.0.14

# measure

React component for measuring the size of a component

## Install

`npm install @pinyin/measure --save`

It should support TypeScript out of the box. If not, please submit an issue.

## Usage

```typescript jsx
import {Measure} from '@pinyin/measure'

<Measure onResize={(resizeObserverEntryArray)=> xx}>
   <AnyMeasuredComponent/> // only the first DOM node is measured
</Measure>

```

`onResize` receives an array of `ResizeObserverEntry`

```typescript jsx
interface ResizeObserverEntry {
    readonly target: Element;
    readonly contentRect: DOMRectReadOnly;
}

interface DOMRectReadOnly {
    readonly bottom: number;
    readonly height: number;
    readonly left: number;
    readonly right: number;
    readonly top: number;
    readonly width: number;
    readonly x: number;
    readonly y: number;
}
``` 

This component does not affect DOM structure.

Unlike many other solutions, this component will auto find another measuring target after the previous target was detached from document.

## Limits & Known Issues

This component is a thin wrapper around [resize-observer-polyfill](https://github.com/que-etc/resize-observer-polyfill), along with all the limits.

All children are rendered, but only the first DOM node in children is measured, so it's best to provide `<Measure/>` with a single child.

Portals in children components are not supported.

Once this component found a measurable node (the first and topmost DOM node rendered by its children), it will not change measuring target until the previous target is removed from document.

Text nodes as measuring targets are not supported yet and may cause unexpected behavior.

## Plan

Support measuring multiple DOM nodes.

## License

MIT
npm package: @pinyin/outline
Description: Transforms
Author: Bo Bao
Latest version: 0.0.17

# outline

[![Build Status](https://travis-ci.org/pinyin/outline.svg?branch=master)](https://travis-ci.org/pinyin/outline)

Hello GPU


# License
MIT (see LICENSE file)
This package also contains code from transformation-matrix and transformation-matrix-js on npm.
npm package: @pinyin/react-many-redux
Description: Redux stores with the new Context API.
Author: Bo Bao
Latest version: 0.0.7

# react-many-redux

Redux stores with the new Context API.

# Install

`npm install @pinyin/react-many-redux`

TypeScript should be supported out of the box.

# Usage

```typescript jsx
import {createStoreContext} from '@pinyin/react-many-redux'
import {createStore} from 'redux'

const {Provider, Consumer} = createStoreContext({counter: 0})
const store = createStore()  // create a redux store

<Provider store={store}>
{/*...use store in descendants */}
    <Consumer distinct={(prev, curr)=> /* Optional. Receives two states, returns a boolean which indicates whether children should be updated */}>
    {
        ({state, dispatch})=> {
            // state: store state
            // dispatch: store.dispatch, dispatch action to store
        }
    }
    </Consumer>
</Provider>
```

see [test](./src/createStoreContext.test.tsx) for a more complete example.

# Notice

This project is in early development.

# License 
MIT
npm package: @pinyin/redux-attach-substore
Description: Multistore Redux.
Author: Bo Bao
Latest version: 0.0.6

# redux-attach-substore

[![Build Status](https://travis-ci.org/pinyin/redux-attach-substore.svg?branch=master)](https://travis-ci.org/pinyin/redux-attach-substore)

Multistore Redux.

## [Usage](./src/attachTo.test.ts)

## TODO 

Detect cyclic substore relation.
npm package: @pinyin/route
Description: Type safe route serializer & deserializer (template & parser)
Author: Bo Bao
Latest version: 0.0.1

# route

[![Build Status](https://travis-ci.com/pinyin/route.svg?branch=master)](https://travis-ci.com/pinyin/route)

Type safe route serializer &amp; deserializer (template &amp; parser)
npm package: @pinyin/tslint
Description: TSLint rules
Author: Bo Bao
Latest version: 0.0.10

# tslint

[![Build Status](https://travis-ci.com/pinyin/tslint.svg?branch=master)](https://travis-ci.com/pinyin/tslint)

TSLint rules.

Should work for JavaScript projects, too.

## Usage

Add this library to project

```
npm install --save-dev @pinyin/tslint tslint-language-service typescript tslint
```

Then, edit `tsconfig.json` to include:

```json
{
  "compilerOptions": {
    "allowJs": true,
    "plugins": [
      {
        "name": "tslint-language-service",
        "mockTypeScriptVersion": true
      }
    ]
  }
}
```

If you are not using TypeScript, create a `tsconfig.json` file at the root of your project.

Edit `tslint.json` to include:

```json
{
  "defaultSeverity": "error",
  "rules": {
    "only-import-from-index": true
  },
  "rulesDirectory": [
    "node_modules/@pinyin/tslint/js"
  ]
}
```

If you are not using TSLint, create a `tslint.json` file at the root of your project.

[Enable TypeScript in your IDE](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support). You should be able to write JavaScript/TypeScript like before, with some additional checks.

TSLint would start with TypeScript Language Service, so there's no need to enable TSLint in your IDE.

## Rules

### only-import-from-index

If a directory contains an index.js/index.ts file, files outside of the directory can only import from index.js/index.ts file. No import can "pass through" the index file.

For example, given the following file structure: 

```
src/
    index.ts(content):
        export {a} from './public'
    public.ts:
        import {b} from './private' // ok
        export const a = b
    private.ts:
        export const b = 'b'
out.ts:
    import {a} from './src' // ok
    import {b} from './src/private.ts' // error
    import {a} from './src/public.ts' // error
```

`out.ts` can only import from `./src`, any other import into `src` will be reported as Error.

Only imports with relevant path will be checked.