open-index/open-npm huggingface dataset:
npm package: @ithreat/auth-provider
Description: authorization provider component
Author: djm-ithreat
Latest version: 1.0.6

# @ithreat/auth-provider

> authorization provider component

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

## Install

```bash
npm install --save @ithreat/auth-provider
```

## Usage

```jsx
import React, { useContext } from 'react'

import { AuthProvider, Auth0Context } from '@ithreat/auth-provider'

const App = () => {
  render() {
    return (
            <AuthProvider
              LoadingIndicator={LoadingIndicator}
              GenericError={GenericError}
              Button={Button}
              LOGIN_REDIRECT={LOGIN_REDIRECT}
              domain={Authorization_domain}
              client_id={ClientId}
              redirect_uri={window.location.origin + LOGIN_REDIRECT}
              onRedirectCallback={onRedirectCallback}
              audience={Auth_Audience}
              scope={Auth_Scope}
            >
              <App2 />
            </AuthProvider>
    )
  }
}

const App2 = () => {
    const { getTokenSilently, getIdTokenClaims, logout } = useContext(Auth0Context);
  return (
    <div>
        App 2 has access to Auth Context.
    </div>
  )
}

export default App;
```

## License

MIT © [djm-ithreat](https://github.com/djm-ithreat)
npm package: @ithreat/stitch-provider
Description: stitch provider component
Author: djm-ithreat
Latest version: 1.0.5

# stitch-provider

> stitch provider component

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

## Install

```bash
npm install --save @ithreat/stitch-provider
```

## Usage

```jsx
import React, { useContext } from 'react'
import {Button} from 'carbon-components-react'
import {Logout16} from '@carbon/icons-react'
import { StitchContext, StitchProvider } from '@ithreat/stitch-provider';
import {GenericError} from './GenericError'
import {LoadingIndicator} from './LoadingIndicator'
import { stitch_client, db_client_data, db } from './constants';

const App = () => {

  const {getTokenSilently, getIdTokenClaims, logout} = useContext(AuthorizationContext);
  return (
       <StitchProvider
                Button={Button}
                getTokenSilently={getTokenSilently}
                getIdTokenClaims={getIdTokenClaims}
                AuthLogout={logout}
                stitch_client={stitch_client}
                db_client_data={db_client_data}
                db={db}
                GenericError={GenericError}
                LoadingIndicator={LoadingIndicator}
                Logout16={Logout16}
            >
      <App2/>
    </StitchProvider>
  )
};
 
const App2 = () => {
  const {db} = useContext(StitchContext);
 
  useEffect(()=>{
    db.collection('collection-name').find()
  })

  return (<div>
    <div>This component has access to the db and other values stored in the Stitch Provider</div>
  </div>);
};
 
export default App;
```

## License

MIT © [djm-ithreat](https://github.com/djm-ithreat)
npm package: @ithreat/toast-provider
Description: UI-agnostic Toast component provider
Author: japhy-
Latest version: 1.1.0

# @ithreat/toast-provider

> UI-agnostic Toast component provider

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

## Install

```bash
npm install --save @ithreat/toast-provider
```

## Usage

```jsx
import React, { useContext, useEffect } from 'react';
import { ToastContext, ToastProvider } from '@ithreat/toast-provider';

const Toast = ({kind, title, subtitle, caption, timeout, onCloseButtonClick, className}) => {
  useEffect(() => {
    const timer = timeout && setTimeout(onCloseButtonClick, timeout);
    return () => timer && clearTimeout(timer);
  }, []);

  return (
    <div className={className} style={{boxSizing: 'border-box', margin: '1em', padding: '1em', zIndex: 1000, backgroundColor: 'silver', position: 'fixed', top: '0px', right: '0px'}}>
      <div style={{display: 'flex', justifyContent: 'space-between'}}>
        <b>{title}</b>
        <button onClick={onCloseButtonClick}>[X]</button>
      </div>
      <div><i>{subtitle}</i></div>
      <div>{kind}: {caption}</div>
    </div>
  );
};

const App = () => {
  return (
    <ToastProvider component={(props) => <Toast {...props} />} >
      <App2/>
    </ToastProvider>
  )
};

const App2 = () => {
  const setToast = useContext(ToastContext);

  const createToast = () => {
    setToast({kind: 'warning', title: 'Beware', subtitle: 'A wild toast has appeared!', caption: 'caption'});
  };

  return (<div>
    <div>This part of the app has access to the Toast provider.</div>
    <div><button onClick={createToast}>Produce a Toast notification!</button></div>
  </div>);
};

export default App;
```

## License

MIT © [japhy-](https://github.com/japhy-)
npm package: @ithreat/use-function
Description: Made with create-react-library
Author: djm-ithreat
Latest version: 1.1.0

# @ithreat/with-function

> Made with create-react-library

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

## Install

```bash
npm install --save @ithreat/with-function
```

## Usage

```jsx
import React, { useContext } from 'react'
import {useFunction} from '@ithreat/use-function';
import {useResults} from '@ithreat/use-results';

const App = () => {
  const {db, stitchClient} = useContext(StitchContext);
  const {setToast} = useContext(ToastContext);
  const query = {};
  const code = 'company-name';
  const results = useResults({
      defaults: {
          pageSize: 25,
          page: 1,
          sortBy: { field: 'field-name', order: -1 },
      },
      watch: { collection: db.collection('collection-name') },
      hook: useFunction({
          func: 'function-name',
          args: [ code, query ],
          onResponse: (res) => {
              results.setCount(res.count);
              results.setResults(res.results.map((r) => ({...r, id: r._id.toString()})));
          },
          setToast,
          stitchClient,
      }),
      onChangePage: ({hook, page, pageSize, sortBy}) => {
          hook.execute([hook.args[0], hook.args[1], (page - 1) * pageSize, pageSize, sortBy.field, sortBy.order]);
      },
  });

  return (
    <div>
      Hook for running a mongo function.  Works well with @ithreat/use-results hook.
    </div>
  )

};

export default App;
```

## License

MIT © [djm-ithreat](https://github.com/djm-ithreat)
npm package: @ithreat/use-mongo-watcher
Description: >
Author: japhy-
Latest version: 1.1.3

# use-mongo-watcher

> 

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

## Install

```bash
npm install --save use-mongo-watcher
```

## Usage

```jsx
import React, { Component } from 'react'

import { useMyHook } from 'use-mongo-watcher'

const Example = () => {
  const example = useMyHook()
  return (
    <div>{example}</div>
  )
}
```

## License

MIT © [japhy-](https://github.com/japhy-)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).
npm package: @ithreat/use-mounted
Description: useMounted hook for checking to see whether a component is mounted
Author: japhy-
Latest version: 1.1.0

# @ithreat/use-mounted

> useMounted hook for checking to see whether a component is mounted

[![NPM](https://img.shields.io/npm/v/@ithreat/use-mounted.svg)](https://www.npmjs.com/package/@ithreat/use-mounted) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @ithreat/use-mounted
```

## Usage

```jsx
import React, { useState } from 'react'

import { useMounted } from '@ithreat/use-mounted'

const Example = () => {
  const isMounted = useMounted()
  const [ value, setValue ] = useState()

  const func = (promise) => {
    promise.then((res) => {
      // if component is no longer mounted, stop now
      if (! isMounted()) return;

      // if component is mounted, we can update state
      setValue(res);
    })
  };
}
```

## License

MIT © [japhy-](https://github.com/japhy-)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).
npm package: @ithreat/use-query
Description: Made with create-react-library
Author: djm-ithreat
Latest version: 1.2.0

# @ithreat/use-query

> Made with create-react-library

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

## Install

```bash
npm install --save @ithreat/use-query
```

## Usage

```jsx
import React, { useContext } from 'react'
import {StitchContext} from '@ithreat/stitch-provider';
import {ToastContext} from '@ithreat/toast-provider';
import {useQuery} from '@ithreat/use-query';

const App = () => {
  const {db} = useContext(StitchContext);
  const {toast} = useContext(ToastContext);
     const queryHook = useQuery({
        collection: 'collection-name',
        baseQuery: {owner: 'company-name'},
        defaultSortField: 'field-name',
        defaultSortOrder: -1,
        defaultPageSize: 50,
        db,
        toast,
    });

  return (
    <div>
      Hook for saving query state and running queries.  Works well with @ithreat/use-results hook.
    </div>
  )

};

export default App;
```

## License

MIT © [djm-ithreat](https://github.com/djm-ithreat)
npm package: @ithreat/use-results
Description: Made with create-react-library
Author: djm-ithreat
Latest version: 1.3.0

# use-results

> Made with create-react-library

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

## Install

```bash
npm install --save use-results
```

## Usage

```jsx
import React, { useContext } from 'react';
import { useResults } from '@ithreat/use-results';
import {StitchContext} from '@ithreat/stitch-provider';
import { useQuery } from '@ithreat/use-query';
import {ToastContext} from '@ithreat/toast-provider';

const App = () => {
  const {db} = useContext(StitchContext);
  const {toast} = useContext(ToastContext);

  const queryHook = useQuery({
      collection: 'collection-name',
      baseQuery: {owner: 'company-name'},
      defaultSortField: 'field-name',
      defaultSortOrder: -1,
      defaultPageSize: 50,
      db,
      toast,
  });

  const onChangePage = (hook) => {
      const { sortBy, pageSize, page } = hook;
      queryHook.runQuery({
          query: queryHook.query,
          page,
          sortBy,
          pageSize,
      });
  };

  const resultsHook = useResults({
      defaults: {
          results: [],
          page: 1,
          pageSize: 50,
          sortBy: 'field-name',
      },
      watch: {collection: db.collection('collection-name')},
      hook: queryHook,
      onChangePage: onChangePage,
  });

  return (
    <div>
      Hook used for storing results from a query including functionality for pagination.
    </div>
  )

};

export default App;
```

## License

MIT © [djm-ithreat](https://github.com/djm-ithreat)
npm package: @ithuairen/universal-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 1.0.16

# 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/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/).

## 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

npm publish --access public


```

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: @itic-sci/iticui
Description: web ui for itic
Latest version: 2.5.23

<div style="margin: 0 auto">
    <div align="center" style="margin-top:40px">
      <img src="https://itic-sci.com/assets/head_logo2.737a1a16.png" width="50" height="50">
       <h3 align="center">ITIC 前端组件库</h3>
    </div>
</div>

# ITIC UI

[![NPM version](https://img.shields.io/npm/v/@itic-sci/iticui.svg?style=flat)](https://npmjs.org/package/@itic-sci/iticui)

## 🎁 如何使用

### 安装组件

```bash
npm install @itic-sci/iticui
```

### 在 React 代码中使用

```jsx
import { Button } from '@itic-sci/iticui';

const App = () => {
    return (
      <Button type={'linear'}>按钮<Button>
    )
}
```

## 👋 如何贡献

查看贡献[须知](./docs/contributing.md)，按照指引，进行贡献。