# ba-logo

> Generate Blue Archive styled logos

Latest version **1.0.3** (published 2024-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install ba-logo
pnpm add ba-logo
yarn add ba-logo
bun add ba-logo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2024-05-06 |
| First published | 2023-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.8 MB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | RedBeanN |
| Maintainers | redbeann |

## Links

- npm: https://www.npmjs.com/package/ba-logo
- Repository: https://github.com/RedBeanN/BALogo
- Homepage: https://github.com/RedBeanN/BALogo#readme
- Issues: https://github.com/RedBeanN/BALogo/issues
- npm.io page: https://npm.io/package/ba-logo

## Dependencies (1)

- [sharp](https://npm.io/package/sharp.md) ^0.32.6

## Recent versions

- 1.0.3 (latest) — 2024-05-06
- 1.0.2 — 2023-10-15
- 1.0.1 — 2023-10-14
- 1.0.0 — 2023-10-14

## README

# BA Logo

[![NPM Version](https://img.shields.io/npm/v/ba-logo)](https://www.npmjs.com/package/ba-logo)

一个用 `nodejs` 合成蔚蓝档案(Blue Archive)风格 Logo 的简单模块.

<img src='docs/ba.png' height="96px" />
<img src='docs/ba-cn.png' height="96px" />

## 用法

```sh
# use npm
npm install ba-logo
# use yarn
yarn add ba-logo
```

```js
const baLogo = require('ba-logo')
baLogo('BlueArchive').then(image => {
  image.toFile('test.png')
  // 返回的是 sharp 实例
  image.toBuffer() // Promise<Buffer>
  image.pipe(createWriteStream()) // to stream
})
```

## 参数

```ts
baLogo(text: string | [string, string], left?: number)
```

`text` 可以是一个字符串, 也可以是两个字符串组成的数组, 为字符串时会自动切分为两段, 为数组时取前两项.

拆分规则大致为:

- 含有空格时, 以空格分割后取前两项
- 以大写字母开头, 且中间含有大写字母时, 按前两个大写字母开头的单词分割
- 对半分割(奇数时中间的字归后段)

可使用第二个可选参数 `left` 调整光环左右位置, 负数左移, 正数右移

---
_Source: https://npm.io/package/ba-logo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
