open-index/open-npm huggingface dataset:
npm package: @ironcoder/utilities
Description: common utilities
Latest version: 1.0.1

# Utilities ![Node.js CI](https://github.com/shm-open/utilities/workflows/Node.js%20CI/badge.svg)

lightweight common utilities lib in es6 module

## Install

`npm install --save @ironcoder/utilities`

## common utilities

`import { * } from '@ironcoder/utilities'`

-   [function: nullFunction](src/function.ts)
-   [listener: utitiles for creating a event listener subject (which supports to add/remove listener)](src/listener.ts)
-   [number: format number for display](src/number.ts)
-   [sampling: smooth samling tool for calculate average values](src/sampling.ts)
-   [tree: utilities for tree data structure](src/tree.ts)
-   [types: utilities for deal with TypeScript types](src/types.ts)
-   [url: utilities for handle url parse and compose](src/url.ts)
-   [version: handle version compare for version strings](src/version.ts)

## react hooks/utilities

`import { * } from '@ironcoder/utilities/lib/react'`

-   [ComposeProviders](src/react/ComposeProviders.ts)
-   [useCallbackProxy](src/react/useCallbackProxy.ts)
-   [useIsMountedRef](src/react/useIsMountedRef.ts)
-   [usePrevious](src/react/usePrevious.ts)
-   [useRefWrapper](src/react/useRefWrapper.ts)
-   [useSyncState](src/react/useSyncState.ts)
-   [useUpdateEffect](src/react/useUpdateEffect.ts)
-   [withClassComponentWrapper](src/react/withClassComponentWrapper.ts)
npm package: @irondome/core
Description: Policy-based access control (PBAC) engine for Irondome
Latest version: 0.1.3

# @irondome/core

> Motor de **autorização** (PBAC, ReBAC, Audit) — sem acoplamento a frameworks.

**Pilar:** políticas e decisões de acesso. Produz `PolicyResult` a partir de `Subject`, `Action` e `Resource`.

Parte do monorepo **[Irondome](../../README.md)** — o mesmo espírito do [README principal](../../README.md): *quem decide o que cada pessoa pode fazer — o código ou a política?*

---

## O que é?

`@irondome/core` é o **núcleo importável** do Irondome: **PBAC** (funções de política), **ReBAC** (tuplas e `checkRelation`), **hooks de auditoria**, catálogo de **roles/actions** e helpers para **páginas** e **painéis por posição** (`subject.attributes.position`).

Não inclui HTTP nem UI — corre em testes, workers e qualquer runtime JS/TS.

---

## Instalação

```bash
pnpm add @irondome/core
```

---

## Dependências

Nenhuma em runtime — pacote **standalone**.

---

## O que inclui

| Área | Conteúdo |
|------|----------|
| PBAC | `PolicyEngine`, `createPermissions`, tipos `Subject`, `Resource`, `Action`, `Context` |
| Catálogo | `Roles`, `actions`, `pageResource`, `namedResource`, `hasRole`, `hasEveryRole` |
| Painel / posição | `PanelPosition`, `POSITION_RANK`, `hasMinimumPosition`, `panelResource`, `actions.panel.*` |
| ReBAC | `MemoryRelationStore`, `checkRelation`, `RelationTuple`, `RelationStore` |
| Audit | `AuditHook`, `createConsoleAuditHook`, `AuditEvent` |

---

## Exemplo rápido (PBAC)

```ts
import { createPermissions, actions, hasRole, Roles, type Policy } from "@irondome/core";

const pagePolicy: Policy = (subject, action, resource) => {
  if (resource.type !== "page" || action !== actions.page.visit) return null;
  if (resource.id.startsWith("/admin")) {
    return hasRole(subject, Roles.admin)
      ? { allowed: true, reason: "admin" }
      : { allowed: false, reason: "apenas admin" };
  }
  return null;
};

export const { can, authorize } = createPermissions({ policies: [pagePolicy] });
```

*(Mesmo padrão do [README do monorepo](../../README.md), secção PBAC.)*

---

## ReBAC e Audit

```ts
import { MemoryRelationStore, checkRelation } from "@irondome/core";
import { createPermissions, createConsoleAuditHook } from "@irondome/core";

const store = new MemoryRelationStore();
await checkRelation(store, "user:alice", "owner", "repo:api", { via: ["member"] });

export const { can } = createPermissions({
  policies: [/* ... */],
  audit: createConsoleAuditHook({ onlyDenied: false }),
});
```

---

## Relação com outros pacotes

| Pacote | Função |
|--------|--------|
| `@irondome/auth` | Transforma login/sessão num `Subject` — **não** substitui este motor |
| `@irondome/next` | Liga `can()` a middleware, Route Handlers, tRPC e React |

---

## Documentação

| Recurso | Ligação |
|---------|---------|
| Monorepo | [README Irondome](../../README.md) |
| Quatro pilares | [Guia dos pilares](../../docs/guia-dos-pilares.md) |
| Publicar no npm | [npm-publish](../../docs/npm-publish.md) |

---

## Licença

MIT © rbxyz
npm package: @ironeko/next-static-tweets
Description: Next Static Tweets builds upon the work done by Lee Robinson and Maxime Heckel to abstract boilerplate code and introduces some helpful hooks to help render Tweets statically in Next.js MDX sites.
Author: Leonardo Petrucci
Latest version: 1.0.1

# Next Static Tweets

Next Static Tweets builds upon the work done by Lee Robinson and Maxime Heckel to abstract boilerplate code and introduces some helpful hooks to help render Tweets statically in Next.js MDX sites.

## Installation

```
  npm i @ironeko/next-static-tweets
```

## Usage

In your `getStaticProps`:

```js
// pages/post.js

import { getTweets } from '@ironeko/next-static-tweets';

export const getStaticProps = async () => {

  // getTweets will automatically find any components named <Tweet>, but it also takes a `regex` config to
  // in case you want to customise it
  const tweets = await getTweets({ markdown: "<Tweet id="1475482722877546510" />" });

  return {
    props: {
      tweets,
    },
  };
};
```

Then wrap your Page export in `withTweets`:

```js
// pages/post.js

import { withTweets } from '@ironeko/next-static-tweets';

function Post() {
  // ...
}

export default withTweets(Post);
```

Then wherever your MDX gets converted into components, for example:

```js
import { MDXProvider } from '@mdx-js/react';
import { useTweet, Tweet as TweetPrimitive } from '@ironeko/next-static-tweets';

function Tweet(id) {
  const { getById } = useTweet();
  return <TweetPrimitive {...getById(props.id)} />;
}

function RenderMyMDXArticle() {
  return <MDXProvider components={{ Tweet }}>{children}</MDXProvider>;
}
```

⚠️ You shouldn't use the `Tweet` component in production, it's just for quick testing. Internally it doesn't use `next/image` so you should most likely re-implement it.

🚨 Internally we use the Twitter V2 API, which unfortunately does not have any endpoints to fetch videos or GIFs. The `Tweet` component deals with this by displaying a warning on hover.
npm package: @ironeko/spuntare
Description: A simple and modern React modal controller.
Author: Leonardo Petrucci
Latest version: 1.0.7

![alt text](https://github.com/coloredcat/spuntare/blob/main/animation.gif)

# Spuntare

Spuntare is a modal controller for React. It is a simple, easy-to-use, and powerful component for creating stacks of modals that can interact and communicate with each other. Spuntare is designed to work with any modal implementation, how modals interact is up to you.

## Features

- Just a wrapper component, works with any existing modal
- Optional enter and exit animations with Framer Motion
- Single config source, instantiate modals with a hook any time you need

## How to use

```
yarn add @ironeko/spuntare
```

Then wrap your app in the context provider:

```jsx
import { SpuntareContextProvider } from '@ironeko/spuntare';

<SpuntareContextProvider>{/* Your app here */}</SpuntareContextProvider>;
```

Pass however many different types of modals you want to use to your configuration.

```jsx
import { SpuntareContextProvider } from '@ironeko/spuntare';

<SpuntareContextProvider
  config={{
    modal: {
      component: Modal,
    },
    overlay: {
      component: Overlay,
    },
  }}
>
  {/* Your app here */}
</SpuntareContextProvider>;
```

Then, somewhere else in your app you can instantiate a modal:

```jsx
import { useSpuntare } from '@ironeko/spuntare';

const App = () => {
  const { create, removeLast } = useSpuntare();
  return (
    <Button
      onClick={() =>
        create('modal', {
          title: 'Woah',
          description: <p>Your first modal!</p>,
          closeProps: {
            onClick: () => removeLast(),
          },
        })
      }
    >
      Open modal
    </Button>
  );
};
```

The first argument to `create` is the name you assigned to your modal type in `config`, the second is whatever props your modal needs. It's not typechecked since we don't know what props your modal takes, so be careful!

Spuntare will also pass its own props to your modal, these can be used to apply styles depending on the modal state. Check the examples for more info.

## Examples

### [Basic example](https://codesandbox.io/s/github/coloredcat/spuntare/tree/main/examples/basic?file=/index.tsx)

Shows how to:

- Use multiple modal components configurations
- Create nested modals
- How to animate entry and exit with `framer-motion`

### [Form example](https://codesandbox.io/s/github/coloredcat/spuntare/tree/main/examples/form?file=/index.tsx)

Shows how to:

- Create a form within a modal
- Share data between modals
npm package: @ironerp/client
Description: The official JS client for IronERP
Author: UTF-8x
Latest version: 0.2.6

# @ironerp/client

![NPM Version](https://img.shields.io/npm/v/%40ironerp%2Fclient)

---

The official JS client for the IronERP API.

## Building

```shell
yarn
yarn build
```

## Usage

TBD

```shell
yarn add @ironerp/client
```
npm package: @ironfish/bfilter
Description: Bloom filters for javascript
Author: Iron Fish
Latest version: 0.0.1

# bfilter

Bloom filters for javascript.

## Usage

``` js
const bfilter = require('bfilter');
```

## Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. `</legalese>`

## License

- Copyright (c) 2017, Christopher Jeffrey (MIT License).

See LICENSE for more info.
npm package: @ironflag/prettier-config
Description: IRONFLAG's extensible shared Prettier config
Author: Han Yeong-woo
Latest version: 1.0.1

# @ironflag/prettier-config

![CI status](https://github.com/ironflag-io/prettier-config/actions/workflows/node-ci.yml/badge.svg)
[![npm version](https://badge.fury.io/js/@ironflag%2Fprettier-config.svg)](https://badge.fury.io/js/@ironflag%2Fprettier-config)

[IRONFLAG]'s extensible shared Prettier config.

[ironflag]: https://ironflag.io/

## Usage

### 1. Install prettier and this package

```sh
npm i -D @ironflag/prettier-config prettier
```

### 2. Add `@ironflag/prettier-config` to your `.prettierrc`

## What is overriden

```js
{
    semi: false, // boost code readability.
    singleQuote: true, // no Shift key.
    tabWidth: 4, // delete code duplicates.
    trailingComma: 'all', // easier code insert/delete.
    overrides: [
        // shorter tab for non-source code.
        {
            files: '*.{md,json,yml,yaml}',
            options: {
                tabWidth: 2,
            },
        },
    ],
}
```