open-index/open-npm huggingface dataset:
npm package: @scienceartmagic/rfc
Description: RFC (Reanimated Fast Context): Jack Herrington's Fast Context, now with an additional version based on Reanimated's useSharedValue.
Author: Science/Art/Magic
Latest version: 0.1.7

# RFC

Reanimated Fast Context

Jack Herrington's [Fast Context](https://www.youtube.com/watch?v=ZKlXqrcBx88) ([fast-context-generic example](https://github.com/jherr/fast-react-context/blob/main/fast-context-generic/src/createFastContext.tsx)), now with an additional version based on Reanimated's useSharedValue.

As of v0.1.0, calling the returned `useFastContext` hook of `createFastContext`/`createReanimatedContext` without an argument results in a default selector of `(store) => store` (in other words, "selects" the entire object you supplied to initialize createFastContext).

## Install

`npm i` or `yarn add` `@scienceartmagic/rfc react-native-reanimated`

Technically, Reanimated is only required if you want to use [`createReanimatedContext()`](https://github.com/ScienceArtMagic/RFC/blob/main/src/createReanimatedContext.tsx) (which uses [Reanimated's `useSharedValue()` hook](https://docs.swmansion.com/react-native-reanimated/docs/api/hooks/useSharedValue/) under the hood). The default export [`createFastContext()`](https://github.com/ScienceArtMagic/RFC/blob/main/src/createRefContext.tsx) (not far from @jherr's original version), which uses [React's `useRef()` hook](https://beta.reactjs.org/reference/react/useRef) under the hood, has no other external dependencies.
npm package: @scienceartmagic/ups
Description: UPS (Universal Persistence Storage): Wrapper around persistence libraries for use in Expo Go, bare/standalone Expo/React Native apps, and web/Electron
Author: Science/Art/Magic
Latest version: 0.0.6

# UPS

(Universal Persistence Storage)

Conditional imports of react-native-mmkv (React Native and Expo Bare/Standalone/Dev Client), @react-native-async-storage/async-storage and expo-secure-store (Expo Go), and localforage (web/Electron, unified API for localStorage, IndexedDB, and WebSQL, defaults to IndexedDB) with a simplified, unified API similar to that of AsyncStorage (namely `getItem()`, `setItem()`, `removeItem()`)

## Install (including peerDependencies)

`npm i` or `yarn add` `@scienceartmagic/ups react-native-mmkv expo-secure-store @react-native-async-storage/async-storage localforage`
npm package: @scienceicons/myst
Description: Open Science Icons in MyST Markdown by Curvenote
Author: Steve Purves
Latest version: 1.0.4

# @scienceicons/myst

A MyST Markdown role for science icons and an accompanying react based renderer

## Installation

Copy the file `scienceicons.mjs` from `dist/` intoyour local `mystmd` project and add it to the list of plugins in `myst.yml`:

```yaml
project:
  plugins:
    - scienceicons.mjs
```

## Using the Role

To use the role simply add it to your MyST markdown like so:

```markdown
Praesent mattis viverra lacus, {scienceicon}`twitter` at cursus eros hendrerit nec {scienceicon}`curvenote`.
```

And the relevant icons will appear inline in your text. Use the icons in links by:

```markdown
... metus ut consequat [{scienceicon}`twitter`](https://x.com/@curvenote) dignissim ante sem ...
```

[Browse the full list of icon names on UNPKG &rarr;](https://unpkg.com/browse/@scienceicons/myst@latest/src/names.json)

> [!TIP]
> MyST Markdown's plugin loading system is still developing, [look out for updates](https://mystmd.org/guide/plugins) on easier ways to access and load plugins.

## Using the renderer

Methods for installing a bundled renderer are still in development by the MyST Markdown project and Curvenote. In the meantime you can install this package from git (`git+https://github.com/<org>/<repo>.git#<branch>`) and include in your build.
npm package: @scienta/axios-oauth2
Description: Cacheable token interceptor for oauth requests with axios
Latest version: 1.3.0

# axios-oauth2
This library makes oauth with axios easy.
There is a oauth-client, a token interceptor and caching.

## Quickstart
You can use only the client, or combine it with the token interceptor and caching.

### Simple client usage
```ts
import axios from 'axios';
import {clientFactory} from '@scienta/axios-oauth';
const client = clientFactory(axios.create(), {
  url: 'https://oauth.com/2.0/token',
  grant_type: 'client_credentials',
  client_id: 'foo',
  client_secret: 'bar',
  scope: 'baz'
});

const auth = await client(); // => { "access_token": "...", "expires_in": 900, ... }
```

### Client usage with interceptor
```ts
import axios from 'axios';
import {clientFactory, interceptorFactory} from '@scienta/axios-oauth';
const axiosInstance = axios.create();
axiosInstance.interceptors.request.use(
  interceptorFactory(clientFactory(axiosInstance, {
    url: 'https://oauth.com/2.0/token',
    grant_type: 'client_credentials',
    client_id: 'foo',
    client_secret: 'bar',
    scope: 'baz'
  }))
);
axiosInstance.get('https://oauth.com/2.0/protectedResource')
```

### Client usage with token-caching interceptor
```ts
import axios from 'axios';
import {clientFactory, interceptorFactory, LockingTokenCache} from '@scienta/axios-oauth';

const axiosInstance = axios.create();
axiosInstance.interceptors.request.use(
  interceptorFactory(
    clientFactory(axiosInstance, {
      url: 'https://oauth.com/2.0/token',
      grant_type: 'client_credentials',
      client_id: 'foo',
      client_secret: 'bar',
      scope: 'baz'
    }),
    new LockingTokenCache()
  )
);

axiosInstance.get('https://oauth.com/2.0/protectedResource')
```

## Locking cache (used by LockingTokenCache)
The `LockingTokenCache` class uses a separate library for locking and caching.
Locking cache is a caching-library suited for simple and complex locking while caching.
Locking with caching ensures that only one request is executed to request a token.
Want to know more? [@scienta/locking-cache](https://www.npmjs.com/package/@scienta/locking-cache).