open-index/open-npm huggingface dataset:
npm package: @lneedy/postcss-bem
Description: 支持bem语法的postcss 7.0.0 插件
Author: lneedy
Latest version: 0.0.1

# Description

This is a postcss(7.0.0) plugin for supportting bem syntax in the process of writing css or pcss.

# Usage

## Install && use

If you want to use this tool,the first step is installing it through npm.

```
npm i @lneedy/postcss-bem --save-dev
```

[npm package](https://www.npmjs.com/package/@lneedy/postcss-bem)

After installing it,this plugin can be used in multiple ways, such as webpack, gulp and so on, you could acquire the detail information at [how to use postcss](https://github.com/postcss/postcss)

## Example

The supported css bem syntax contains mainly @component, @descendent @modifier @when. A usage example as follows:

```css
@component container {
  color: red;
  @descendent child {
    color: yellow;
  }
  @modifier des {
    color: gray;
  }
  @when state {
    color: green;
  }
}
```

```css
/* 编译后 */
.container {
  color: red;
}
.container-child {
  color: yellow;
}
.container--des {
  color: gray;
}
.container_state {
  color: green;
}
```
npm package: @lneedy/saladcss-bem
Description: webpack 4.0 PostCSS ^7.0.0 plugin implementing BEM as at-rules
Author: lneedy
Latest version: 0.0.4

# PostCSS Bem [![Build Status][ci-img]][ci]

[PostCSS] plugin implementing BEM as at-rules.

```css
@utility utilityName {
  color: green;
}

@utility utilityName small {
  color: blue;
}

@component ComponentName {
  color: cyan;

  @modifier modifierName {
    color: yellow;
  }

  @descendent descendentName {
    color: navy;
  }

  @when stateName {
    color: crimson;
  }
}

@component-namespace nmsp {
  @component ComponentName {
    color: red;
  }
}
```

```css
.u-utilityName {
  color: green;
}

.u-sm-utilityName {
  color: blue;
}

.ComponentName {
  color: cyan;
}

.ComponentName--modifierName {
  color: yellow;
}

.ComponentName-descendentName {
  color: navy;
}

.ComponentName.is-stateName {
  color: crimson;
}

.nmsp-ComponentName {
  color: red;
}
```

**With shortcuts**

```css
@b nav {
  /* b is for block */
  @e item {
    /* e is for element */
    display: inline-block;
  }
  @m placement_header {
    background-color: red;
  }
}
```

```css
.nav {
}
.nav__item {
  display: inline-block;
}
.nav_placement_header {
  background-color: red;
}
```

## Usage

```js
postcss([
  require('postcss-bem')({
    defaultNamespace: undefined, // default namespace to use, none by default
    style: 'suit', // suit or bem, suit by default,
    separators: {
      descendent: '__' // overwrite any default separator for chosen style
    },
    shortcuts: {
      utility: 'util' //override at-rule name
    }
  })
])
```

See [PostCSS] docs for examples for your environment.
npm package: @lnfi-network/naapi
Description: nostr assets api sdk
Author: jim1007
Latest version: 1.0.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# NAAPI
It is an SDK library developed based on the NOSTR ASSET protocol, used to query transactions、balance、tokenEvents.

## Support method list

### NAAPI.assets
1. getBalance
2. getTokenList
3. getAllowance
4. getFundingRecords
5. getTokenEvents
6. getHolders
7. getHolder
8. getHolderSummary
9. getPayeeList
### NAAPI.markets
1. getMarketTokenList
2. getMarketOrderListing
3. getOrderHistory
4. getMarketMyOrder
5. return
### NAAPI.fairmint
1. getHoroscopList
2. getActivity
3. getUserInfo
4. getUserList
5. getRankingSummary
6. getSearchRanking
7. getBlockList
8. getBlockUserList
### NAAPI.lock
1. getLockList


## Setup
### React
#### install
```
yarn add naapi

```
#### code
```
import {useCallback} from 'react
import NAAPI from 'naapi'
const naapi = new NAAPI('https://market-api.nostrassets.com') // dev:
https://market-api.unift.xyz,prod:https://market-api.nostrassets.com
const onQueryBalance = useCallback(async()=>{
    const res = await naapi.assets.getBalance(owner)
},[])
return <>
{your code}
</>


```
## More Example
tests/*.test.js

## License
MIT License

Copyright (c) 2024 Luke

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.
npm package: @lnfsink/file-handler
Description: Files can be read and written by line synchronously
Author: lnfsink
Latest version: 1.0.0

## File Handler
`@lnfsink/file-handler` can synchronously read and write files by line

## Install

Using npm:

```shell
$ npm install @lnfsink/file-handler
```

Using yarn:

```shell
$ yarn add @lnfsink/file-handler
```

## Usage

```javascript
const handler = require('@lnfsink/file-handler')

let reader = handler.read('example/input.txt', {
  bufferSize: 1024 * 1024, // 1M Default
  encoding: 'utf8' // Default
})
let writer = handler.write('example/output.txt', {
  cacheLines: 1000 // Cache some lines before writing to the file
})
for (let line of reader) {
  writer.writeLine(line)
}
writer.close()
```
npm package: @lnfusion/gatsby-source-graphql
Description: Gatsby plugin which adds a third-party GraphQL API to Gatsby GraphQL with whitelabels
Latest version: 0.0.4

# gatsby-source-graphql-whitelabel

This works the same as [Gatsby's GraphQL source plugin](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-graphql), but allows for whitelabeling the module itself. Specially useful for building integration packages for things that already supports GraphQL, but needs only a tiny amount of work to get a better user experience.
npm package: @lng2004/bbob-cli
Description: Comand line bbcode parser
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/cli
[![install size](https://packagephobia.now.sh/badge?p=@bbob/cli)](https://packagephobia.now.sh/result?p=@bbob/html) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-cli%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-cli%2Fpackage.json)

> Converts bbcode string to html 

```shell
npm i -g @bbob/cli
```

```shell
echo "[i]Text[/i]" | bbob

# prints
<span style="font-style: italic;">Text</span>
```
npm package: @lng2004/bbob-core
Description: ⚡️Blazing-fast js-bbcode-parser, bbcode js, that transforms and parses to AST with plugin support in pure javascript, no dependencies
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/core
[![install size](https://packagephobia.now.sh/badge?p=@bbob/core)](https://packagephobia.now.sh/result?p=@bbob/core) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-core%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-core%2Fpackage.json)

> Internal package for @bbob/html @bbob/react @bbob/vue2
npm package: @lng2004/bbob-html
Description: A BBCode to HTML Renderer part of @bbob
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/html
[![install size](https://packagephobia.now.sh/badge?p=@bbob/html)](https://packagephobia.now.sh/result?p=@bbob/html) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-html%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-html%2Fpackage.json)

> Converts @bbob/parser AST tree to html

```shell
npm i @bbob/html @bbob/preset-html5
```

```js
import bbobHTML from '@bbob/html'
import presetHTML5 from '@bbob/preset-html5'

const processed = bbobHTML(`[i]Text[/i]`, presetHTML5())

console.log(processed); // <span style="font-style: italic;">Text</span>
```
npm package: @lng2004/bbob-parser
Description: A BBCode to AST Parser part of @bbob
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/parser
[![install size](https://packagephobia.now.sh/badge?p=@bbob/parser)](https://packagephobia.now.sh/result?p=@bbob/parser) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-parser%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-parser%2Fpackage.json)

> Parses BBCode and returns array AST tree 

Valid for use with [posthtml-render](https://github.com/posthtml/posthtml-render)

## Install

```bash
npm i @bbob/parser
```

## Usage

### API

```js
import { parse } from '@bbob/parser'

const options = {
    onlyAllowTags: ['url', 'h'],
    onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
};
const ast = parse('[url=https://github.com]hello world![/url]', options)
```

**Results to** 

```json
[
    {
        "tag": "url",
        "attrs": {
            "url": "https://github.com"
        },
        "content": ["hello", " ", "world!"]
    }
]
```

### PostHTML

```js
import render from 'posthtml-render'
import { parse } from '@bbob/parser'

const options = {
    onlyAllowTags: ['url', 'h'],
    onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
};

const ast = parse('[url=https://github.com]hello world![/url]', options);
const html = render(ast) // <url url="https://github.com">hello world!</url>
```
npm package: @lng2004/bbob-preset
Description: Base preset for creating extensible presets for @bbob/core
Author: Nikolay Kostyurin
Latest version: 4.2.0

#@bbob/preset
Base function for create presets to process bbcode AST to HTML or Framework specific tags

## Install

```bash
npm i @bbob/preset
```
### API

**For plain HTML**

```js
import { createPreset } from '@bbob/core'

import { createPreset } from '@bbob/preset'

const options = {
    onlyAllowTags: ['url', 'h'],
    onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
};
const pre = parse('[url=https://github.com]hello world![/url]', options)
```
## Usage
npm package: @lng2004/bbob-react
Description: A BBCode to React Renderer part of @bbob
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/react
[![install size](https://packagephobia.now.sh/badge?p=@bbob/react)](https://packagephobia.now.sh/result?p=@bbob/react) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-react%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-react%2Fpackage.json)

> Converts @bbob/parser AST tree to React

```shell
npm i @bbob/react @bbob/preset-react
```

```jsx
import React from 'react'
import BBCode from '@bbob/react';
import presetReact from '@bbob/preset-react';

const plugins = [presetReact()];

export default () => (
    <BBCode plugins={plugins}>
    [table]
      [tr]
          [td]table 1[/td]
          [td]table 2[/td]
      [/tr]
      [tr]
          [td]table 3[/td]
          [td]table 4[/td]
      [/tr]
    [/table]
    </BBCode>
)
```

```jsx
import { render } from '@bbob/react'

export default () => render(`
[table]
  [tr]
      [td]table 1[/td]
      [td]table 2[/td]
  [/tr]
  [tr]
      [td]table 3[/td]
      [td]table 4[/td]
  [/tr]
[/table]
`)
```
npm package: @lng2004/bbob-vue2
Description: A BBCode to Vue2 Renderer part of @bbob
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/vue2
[![install size](https://packagephobia.now.sh/badge?p=@bbob/vue2)](https://packagephobia.now.sh/result?p=@bbob/vue2) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-vue2%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-vue2%2Fpackage.json)

> Converts @bbob/parser AST tree to Vue 2


```shell
npm i @bbob/vue2 @bbob/preset-vue
```

```js
import Vue from 'vue'
import VueBbob from '@bbob/vue2';

Vue.use(VueBbob);
```

```html
<template>
  <div class="vue2">
    <h2>Generated vue2 here</h2>
    <bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
  </div>
</template>
<script>
  import Vue from 'vue'
  import preset from '@bbob/preset-vue'
  
  export default Vue.extend({
    name: 'App',
    data() {
      return {
        bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
        plugins: [
          preset()
        ],
      }
    }
  })
</script>
```
npm package: @lng2004/bbob-vue3
Description: A BBCode to Vue3 Renderer part of @bbob
Author: Nikolay Kostyurin
Latest version: 4.2.0

# @bbob/vue3

[![install size](https://packagephobia.now.sh/badge?p=@bbob/vue3)](https://packagephobia.now.sh/result?p=@bbob/vue3) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-vue3%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-vue3%2Fpackage.json)

> Converts @bbob/parser AST tree to Vue 3

```shell
npm i @bbob/vue3 @bbob/preset-vue
```

```js
import { defineComponent } from 'vue'
import VueBbob from '@bbob/vue3';

Vue.use(VueBbob);
```

```html
<template>
  <div class="vue3">
    <h2>Generated vue3 here</h2>
    <bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
  </div>
</template>
<script>
  import Vue from 'vue'
  import preset from '@bbob/preset-vue'
  
  export default defineComponent({
    name: 'App',
    data() {
      return {
        bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
        plugins: [
          preset()
        ],
      }
    }
  })
</script>
```