open-index/open-npm huggingface dataset:
npm package: @rockme/casbin-knex-adapter
Description: Knex adapter for Casbin
Author: Jakub Sarnowski
Latest version: 0.7.3

# Knex Adapter

[![NPM Version][npm-image]][npm-url]
![](https://github.com/knex/casbin-knex-adapter/workflows/ci/badge.svg)
[![Coverage Status](https://coveralls.io/repos/knex/casbin-knex-adapter/badge.svg?branch=master)](https://coveralls.io/r/knex/casbin-knex-adapter?branch=master)

[Knex](https://github.com/knex/knex) Adapter for [Node-Casbin](https://github.com/casbin/node-casbin). Use this library for [policy storage](https://casbin.org/docs/en/adapters) in Casbin.

For full database support list, go to the Knex [documentation](https://knexjs.org/#Installation-node).

## Installation

`npm install casbin-knex-adapter --save`

or

`yarn add casbin-knex-adapter`

## Example

```js
const Knex = require('knex')
const casbin = require('casbin');
const KnexAdapter = require('casbin-knex-adapter');

(async function() {
  // Instantiate DB connection
  const knex = Knex(knexOptions)
  // Create adapter
  const adapter = await KnexAdapter.newAdapter({ knex });

  // Create casbin enforcer
  const enforcer = await casbin.newEnforcer('model.conf', adapter);

  // Load policy from DB
  await enforcer.loadPolicy();

  // Check permission
  if (await enforcer.enforce('user', 'resource', 'read')) {
    // Do something if user is authorized
  }

  // Modify policy
  // await enforcer.addPolicy(...)
  // await enforcer.removePolicy(...)
  // await adapter.removePolicyWhere({ 'v0': '00001' }) // needs to be reloaded from enforcer afterwards

  // Rewrite entire policy in DB
  await enforcer.savePolicy();
})();
```

[npm-image]: https://img.shields.io/npm/v/casbin-knex-adapter.svg
[npm-url]: https://npmjs.org/package/casbin-knex-adapter
npm package: @rockme/iconify-json-tb
Description: TB icon set in Iconify JSON format
Latest version: 1.0.3

# Tb

This package contains icon data for teambition icon set.

Files:

-   Icon data is stored in `icons.json` in `IconifyJSON` format. See [IconifyJSON documentation](https://iconify.design/docs/types/iconify-json.html).
-   Icon set information is stored in `info.json` in `IconifyInfo` format. See [IconifyInfo documentation](https://iconify.design/docs/types/iconify-info.html).

## Installation

```bash
npm install @rockme/iconify-json-tb --save-dev
```

## Usage

Icon data can be used with many tools and components, see [Iconify documentation](https://iconify.design/docs/usage/).

To convert to SVG, you can use [Iconify Utils](https://iconify.design/docs/libraries/utils/examples/export-svgs-from-icon-set.html) for basic usage or [Iconify Tools](https://iconify.design/docs/libraries/tools/).

## unocss

```json
    presetIcons({
      collections: {
        tb: async () => {
          const { icons } = await import('@rockme/iconify-json-tb');
          return icons;
        },
      }
    })
```