open-index/open-npm huggingface dataset:
npm package: @ftajs/qjsc-linux-x64-gnu
Description: This is the **x86_64-unknown-linux-gnu** binary for `@ftajs/qjsc`
Latest version: 0.0.4

# `@ftajs/qjsc-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@ftajs/qjsc`
npm package: @ftajs/ts-enum
Description: 在 ts/js 获得更强的enum类型提示  
Author: Qic
Latest version: 1.0.0

# `ts-enum`

## [DEMO](https://codesandbox.io/embed/priceless-https-vv6my?fontsize=14&hidenavigation=1&theme=dark)

## **动机**

在 `ts/js` 的前端中后台项目中存在大量的枚举值，需要在各种地方引用！  
因为`js`没有类型系统 `ts`的`enum`类型没有很强大的`api`，导致在很多情况下在各业务代码之间引用枚举时不知道此枚举的期望值是多少，可读性和`CR`体验很差

## 做了什么

基于业务场景，锻炼了类型体操

- 借助 ts 类型系统，获得枚举值的 IDE 提示
- 改善开发体验
- 工具类库

## 安装

```bash
$ npm install type-enum
```

## V2 版本

## 枚举值定义

**约定:** 枚举常量为二维数组（`[ label, value, code ]`）：

```json
[
  ["未开始", 0, "UNDO"],
  ["进行中", 1, "DOING"],
  ["已结束", 2, "DONE"]
]
```

需要使用借助 `typescript` 的 const 断言`const assertions`  
所以在 js 和 ts 中构建 enum 有一点差异

## V2 版本

`>= 2.0` 版本保留了之前 `TsEnum` 的默认导出之外还新增了两个函数的导出：

- `createTsEnum` 函数的入参与之前的`TsEnum`类构造器参数保持一致，返回值的对象行为业余 `TsEnum`类示例保持一致
- `createCustomEnum` 函数的支持**自定义枚举的 label**，会根据传入的`labels`顺序解析常量的二维数组，并且生成相应的`get`方法

```ts
import { createTsEnum, createCustomEnum } from 'type-enum'

/**
 * 默认标签 [label, value, key]
 */
const workStatusEnum = createTsEnum([
  ['未开始', 0, 'UNDO'],
  ['进行中', 1, 'DOING'],
  ['已结束', 2, 'DONE'],
] as const) // 必须使用 as const ！！

/**
 * 自定义标签 ['label', 'value', 'key', 'isValid']
 */
const customWorkStatusEnum = createCustomEnum(
  [
    [0, '未开始', 'UNDO', true],
    [1, '进行中', 'DOING', false],
    [2, '已结束', 'DONE', true],
  ] as const,
  ['label', 'value', 'key', 'isValid'] as const,
) // 必须使用 as const ！！
```

## V1 版本

### in typescript

```ts
import { TsEnum } from 'type-enum'
/**
 * 枚举值定义
 * @param {array[]} 二维数组，[label, value, key]
 */
const workStatusEnum = new TsEnum([
  ['未开始', 0, 'UNDO'],
  ['进行中', 1, 'DOING'],
  ['已结束', 2, 'DONE'],
] as const) // 必须使用 as const ！！
```

### in javascript

最新的 typescript + vscode 已经支持采用 jsdoc 的方式 支持 `const assertions`  
`vs-code >= 1.63`
`typescript >= 4.5.2`

```js
import { TsEnum } from 'type-enum'

const WORK_STATUS = /** @type {const} */ ([
  ['未开始', 0, 'UNDO'],
  ['进行中', 1, 'DOING'],
  ['已结束', 2, 'DONE'],
])
/**
 * 枚举值定义
 * @param {array[]} 二维数组，[label, value, key]
 */
const workStatusEnum = new TsEnum(WORK_STATUS) // 必须使用 as const ！！
```

在旧版本中可以采用 `.d.ts` 补充类型提示

```js
// src/enum/enum.js
export const WORK_STATUS = [
  ["未开始", 0, "UNDO"],
  ["进行中", 1, "DOING"],
  ["已结束", 2, "DONE"],
];

// src/enum/enum.d.ts
export const WORK_STATUS = [
  ["未开始", 0, "UNDO"],
  ["进行中", 1, "DOING"],
  ["已结束", 2, "DONE"],
] as const;

// src/enum/index.js
import { TsEnum } from 'type-enum'
import { WORK_STATUS } from './enum'

const workStatusEnum = new TsEnum(WORK_STATUS)
```

```ts
/**
 * 下拉框数据：
 * 可以推导  options 类型
 *@type {[ { "label": "未开始", "value": "0" }, { "label": "进行中", "value": "1" }, { "label": "已结束", "value": "2" } ]}
 */
const options = workStatusEnum.options()

// 通过 key 获取 value：
const codes = workStatusEnum.getCodes()

codes.DOING.label // IDE 自动推导出 label is '进行中'
codes.DOING.value // IDE 自动推导出 value is 1
```
npm package: @ftaoba/ble-central
Description: ftaoba ble central
Author: Syu Kato
Latest version: 0.1.4

# ftaoba-ble-centraljs

ftaoba ble central for browser.

## Install

```
npm install @ftaoba/ble-central
```

## Usage

```ts
import { FTAobaBLECentral } from "@ftaoba/ble-central";

const ftaobaCentral = await FTAobaBLECentral.initialize();

ftaobaCentral.on("data", (data) => {
  console.log(data.transform);
});
```
npm package: @ftapiat/js-clp-utils
Description: Librería para limpiar, formatear y generar valores a peso chileno
Author: ftapiat
Latest version: 1.0.1

# JS Clp Utils

Librería para limpiar, formatear y generar valores a peso chileno.

## Contenido

- [Instalación](#instalación)
- [Cómo Usarlo](#cómo-usarlo)
    - [`ClpModel`](#clpmodel)
      - [Propiedades de ClpModel](#propiedades-de-clpmodel)
      - [Crear ClpModel](#crear-clpmodel)
    - [Funciones](#funciones)
      - [Limpiar string con peso chileno](#limpiar-string-con-peso-chileno)
      - [Formatear número a peso chileno](#formatear-número-a-peso-chileno)
- [Testing](#testing)

## Instalación

```bash
npm install --save @ftapiat/js-clp-utils
```

## Cómo usarlo

Puedes usar el modelo `ClpModel` para crear un valor de peso chileno, o puedes importar directamente las `funciones`:

### `ClpModel`

Representa a un Peso chileno.

#### Propiedades de ClpModel

Este RUT tiene 4 propiedades:
1. `value` Valor del peso, requerido en el constructor.
3. `formatted` Valor del peso formateado con puntos. Calculado automáticamente.
4. `formattedWithSign` Valor del peso con signo peso y puntos. Calculado automáticamente.

#### Crear ClpModel

- Puedes crear un `ClpModel` de la siguiente forma:
```js
import {ClpModel} from "@ftapia/js-clp-utils";

const clp = new ClpModel(100000);
clp.value; // 100000
clp.formatted; // "100.000"
clp.formattedWithSign; // "$100.000"
```
- También puedes crearlo usando un string:
```js
import {ClpModel} from "@ftapia/js-clp-utils";

const clp1 = ClpModel.fromString('100000');
const clp2 = ClpModel.fromString('100.000');
const clp3 = ClpModel.fromString('$100.000');
const clp4 = ClpModel.fromString('$100000');
const clp5 = ClpModel.fromString('$100000');
const clp6 = ClpModel.fromString('100.0.00'); // Esta función no reconoce los float, por lo que el resultado será un entero (100000).
const clp7 = ClpModel.fromString('abcde'); // ❌ Arrojará un error `TypeError`
```

### Funciones

Todas las características de `ClpModel` se subdividieron en varias funciones:

#### Limpiar string con peso chileno
```js
import {cleanNumber} from "@ftapia/js-clp-utils";

// Limpia el string de valores que no sean numéricos y retorna un `number`
const number = cleanNumber('19101178.3'); // '191011783'
const badNumber = cleanNumber('abcde'); // Esto arrojará un error `TypeError`
```

#### Formatear número a peso chileno

- Con puntos:
```js
import {addDotsToNumber} from "@ftapia/js-clp-utils";

const formattedWithDots = addDotsToNumber('191011783'); // '191.011.783'
```

- Con puntos y signo peso:
```js
import {addSignAndDotsToNumber} from "@ftapia/js-clp-utils";

const formattedWithSignAndDots = addSignAndDotsToNumber('191011783'); // '$191.011.783'
```

## Testing

```bash
npm install
npm test
```
npm package: @ftapiat/ts-library-template
Description: Plantilla para desarrollar paquetes de Javascript usando Typescript
Author: ftapiat
Latest version: 1.1.1

# Paquetes NPM

Debes tener instalado **npm** y luego ejecutar el comando `npm install`.

Esto instalará: 
- Jest
- EsLint
- Prettier
- Typescript

# Modificaciones del template para proyecto

- Debes eliminar la carpeta **doc**.
- En **package.json** debes reemplazar:
  - **@ftapiat/ts-library-template** por el nombre de tu proyecto.
  - **version** por la versión de tu proyecto.
  - **description** por la descripción de tu proyecto.
  - **keywords** por las palabras clave de tu proyecto.
  - **author** por el autor de tu proyecto.
  - Los datos de **repository** por la url de repositorio de tu proyecto.
  - **license** por la licencia que usarás.
  - **directories** puedes eliminar **doc** si eliminaste la carpeta.
- Si vas a desarrollar para una versión superior de ES5, debes modificar la propiedad 
**target** del archivo **tsconfig.json**.

# EsLint

Este proyecto tiene implementado ESLint. Este es una herramienta de linting que se encarga de revisar el código de 
una forma automática y correcta.

Puede que al abrir el proyecto este esté desactivado, por lo que tendrás que activarlo manualmente. Si estás usando una 
herramienta de JetBrains como PHPStorm o WebStorm, puedes activarla en la sección 
**Languages & Frameworks > Code Quality Tools > ESLint**, seleccionando la opción **Automatic ESLint configuration** 
de la siguiente forma:

![Captura para implementar EsLint en IntelliJ (PHPStorm)](/doc/capturas/1.EsLinter-IntelliJ.PNG)

# Prettier

Este proyecto cuenta con Prettier, que es una herramienta que se encarga de formatear el código de una forma más bonita. 
Esto lo realiza corrigiendo o agregando espacios, cambiando las comillas dobles por comillas simples
(según el contexto), etc.

Para asociarlo con el comando de JetBrains para formatear código (**CTRL + ALT + L**), debes dirigirte a
**Languages & Frameworks > JavaScript > Prettier**, seleccionando la opción **on 'Reformat Code' action** 
de la siguiente forma:

![Captura para mapear Prettier con el comando de formateo de Código en IntelliJ (PHPStorm)](/doc/capturas/2.Prettier-IntelliJ.PNG)

# Pruebas Jest

## Escribir pruebas

Las pruebas deben estar escritas en la carpeta **src/__tests__**. Estas deben comprobar el funcionamiento correcto de 
cada clase, función, componente de la aplicación. 

La extensión del archivo debe ser **.test.ts**.

## Ejecutar pruebas

Las puedes ejecutar con el comando `npm test`.
npm package: @ftbjs/shared
Description: A utils tool
Latest version: 0.2.4

<h1 align="center">Welcome to ftb-service 👋</h1>
<p>
  <img alt="Version" src="https://img.shields.io/badge/version-0.0.0-blue.svg?cacheSeconds=2592000" />
  <a href=" " target="_blank">
    <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
  </a>
  <a href="https://github.com/ftbjs/ftb-service/graphs/commit-activity" target="_blank">
    <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
  </a>
  <a href="https://github.com/ftbjs/ftb-service/blob/master/LICENSE" target="_blank">
    <img alt="License: MIT" src="https://img.shields.io/github/license/BiYuqi/ftb-service" />
  </a>
</p>

> A tool to start a server with Webpack. support hot module replacement and build.

### 🏠 [Homepage](https://github.com/ftbjs/ftb-service#readme)

### ✨ [Example](https://github.com/ftbjs/ftb-service/tree/master/example)

## Install

```sh
npm i @ftbjs/service -g
```

## Usage

```js
// start a local serve
ftbjs serve

// build project
ftbjs build

// visualize size of webpack output files
ftbjs build --analyzer
```

## Required

You need to have a src folder. and its has a index.js file. then run the `ftbjs serve` or `ftbjs build`. For more information please see [Example](https://github.com/ftbjs/ftb-service/tree/master/example)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/ftbjs/ftb-service/issues). You can also take a look at the [contributing guide]().

## Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2020 [biyuqiwan@163.com](https://github.com/BiYuqi).<br /> This project is [MIT](https://github.com/ftbjs/ftb-service/blob/master/LICENSE) licensed.

---

_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
npm package: @ftchinese/component-stats
Description: Statistics for a component
Author: weiguo.ni
Latest version: 0.3.0

# Usage

```js
const stats = require('@ftchinese/component-stats');
stats(options);
```

`options` is an object with:
* `repoDir` String. The repo to collection information. Default to cwd.
* `outDir` String. The destination directory to put result json file. Default to cwd.
npm package: @ftchinese/ftc-footer
Description: Responsive FTC page footer
Author: weiguo.ni
Latest version: 0.3.0

Installation:
```
bower install ftc-footer --save
npm install @ftcinese/ftc-footer --save
```

## API
### JS
For node.js only. **NOT** for frontend. Used to get the json data to render nunjucks template.

```js
const getFooterData = require('@ftchinese/ftc-footer');
const footer = getFooterData(options)
```

`options` is an object with the following fields:
* `theme`. A string specifying the theme to use. Could be `theme-dark` or `theme-light`. Default `theme-dark`.
* `type` A string specifying which group of data you want to use. Could be `matrix` or `simple`.
* Returns an object.

### Nunjucks
Specify the path to the partial file:

```js
const env = new nunjucks.Environment(
  new nunjucks.FileSystemLoader(
    [
// the path pointing to you current project's view dir.
      path.resolve(process.cwd(), 'views'),
// the path pointing to ftc-footer partial file in you installed it via bower      
      path.resolve(process.cwd(), 'bower_components/ftc-footer'),
// Or if you installed via npm
      path.resolve(process.cwd(), 'node_modules/@ftchinese/ftc-footer')      
    ],
    {noCache: true}
  ),
  {autoescape: false}
);
```

Then in your template file:
```
{% include "o-footer.html" %}
// or if you prefer the 'simple' one:
{% include "o-footer-simple.html" %}
```

### SCSS
Use the default style:
```scss
$o-footer-is-silent: false;
@import "ftc-footer/main";
```
The container's defaut clas name is `o-footer`

Or you can use your own classname:
```scss
@import "ftc-footer/main";
@include oFooterBase($classname: 'my-footer');
@include oFooterMatrix($classname: 'my-footer');
@include oFooterSimple($classname: 'my-footer');
```
npm package: @ftchinese/ftc-login-react
Description: The login partial of ftc-header. It is the react version.
Author: wangyichen
Latest version: 1.7.0

# ftc-login-react
[![](https://travis-ci.org/wangyichen1064431086/ftc-login-react.svg?branch=master)](https://travis-ci.org/wangyichen1064431086/ftc-login-react)

<!-- MARKDOWN 插图基础格式： [![Alt text](图片链接)](点击图片后跳转链接) -->

The login component for FTC. React version. It is a part of ftc-header-react.

## Install
```c
cd yourProject
npm install react react-dom prop-types
npm install "@ftchinese/ftc-login-react" --save 
```

## Usage
Example:

```js
import Login from '@ftchinese/ftc-login-react';
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(
  <Login postUrl="/users/login" findPasswordUrl="http://www.ftchinese.com/users/findpassword" registerUrl="http://user.ftchinese.com/register" />,
  document.getElementById('root')
);
```

## Props of Login
You can know about it by the proptypes:

```js
static propTypes = {
  accountType: PropTypes.oneOf(['email', 'username', 'both']).isRequired,
  postUrl: PropTypes.string.isRequired,
  findPasswordUrl: PropTypes.string,
  registerUrl: PropTypes.string,
  closeFunc: PropTypes.func,
  show: PropTypes.bool,
  validateFailed: PropTypes.bool

};

```
### accountType
Type string. Required. Default 'email'. The type of the account, which can be one of 'email', 'username', 'both'.

### postUrl
Type string. Required. The url for posting data when clicking the 'submit' button.

### findPasswordUrl
Type string. Optional.The url of the page for finding password.

### registerUrl
Type string. Optional.The url of the page for new user's registering.

### closeFunc
Type Function. Optional. Default null.

It decide this component is a smart or dumb.

If it is null, the component is smart and the <code>show</code> prop only decides the initial showing or hiding of the component. And when clicking the cross on the right left of the window or clicking the gray background, the build-in function <code>closeOverlay</code> of the component will be called.

Otherwise, if it is not null, the component is dumb and the <code>show</code> prop totally decides the showing or hiding of the component. The <code>closeFunc</code> will be a function provided by the parent component and change the state of the parent, then the <code>show</code> prop will be changed according to the state of the parent. And the closeFunc is called when clicking the close button on the right left of the login window or the gray background.

### show
Type Boolean.Optional. Default true. Only decides to show the login window or not initally when where is no <code>closeFunc</code>. However, it totally decides the showing or hiding of the component when there is <code>closeFunc</code>. More details see above **closeFunc**

### validateFaield
Type Boolean.Optional.If it is true, it will show the err infomation for validating failed. The information word is '用户不存在或密码错误'.
npm package: @ftchinese/ftc-logos
Description: FTC logos
Author: weiguo.ni
Latest version: 1.2.0

Generate FTC logos and favicons

## Node.js API

Installation
```
npm install @ftchinese/ftc-logos --save
```

### Generate Images

```js
const logoImages = require('ftc-logos');
logoImages(outDir='public/ftc-logos');
```

* `outDir` String. The destination directory you want to save the images. Default to `public/ftc-logos` of currently running node.js process.

### Get FT image service's url

```js
const logoImages = require('ftc-logos');
const url = logoImages.buildUrl(config)
```

`config` is an Object
* `name` String. SVG file name without extension. One of `brand-ftc-logo-round`, `brand-ftc-logo-square` or `brand-ftc-masthead`.
* `size` Number. Desired height of the the image.
* `format` String. `svg` or `png`.
* `tint` String. Optional. Hex color. Image shape's filling color. Could only be used on `brand-ftc-masthead`.

Example:

```js
const url = logoImages.buildUrl({
    name: 'brand-ftc-masthead',
    size: 100,
    format: 'png',
    tint: '#D75893'
});
// https://www.ft.com/__origami/service/image/v2/images/raw/http%3A%2F%2Finteractive.ftchinese.com%2Flogo-images%2Fbrand-ftc-masthead.svg?source=ftchinese&height=100&format=png&tint=%23D75893
```

## SCSS

Installation
```
bower install ftc-logos --save
```

### API

```scss
@import "ftc-logos/main";

// Function to get an image's url from FT image service
oLogosImageUrl($name, $size, $format, $tint:null);

// Mixins
@include oLogosGetImage($name, $tint:null, $apply-base-style: true)
```
npm package: @ftchinese/ftc-pushdownmenu-react
Description: The pushdown menu for language selection partial of ftc-header. It is the react version.
Author: wangyichen
Latest version: 1.3.3

# ftc-pushdownmenu-react
[![](https://travis-ci.org/wangyichen1064431086/ftc-pushdownmenu-react.svg?branch=master)](https://travis-ci.org/wangyichen1064431086/ftc-pushdownmenu-react)

<!-- MARKDOWN 插图基础格式： [![Alt text](图片链接)](点击图片后跳转链接) -->

The pushdown menu component for FTC. React version. It is a part of  ftc-header-react.

## Install

```cmd
cd yourProject
npm install react react-dom prop-types
npm install "@ftchinese/ftc-pushdownmenu-react" --save 
```

## Usage
Example:

```js
import {PushdownMenu, PushdownItem} from '@ftchinese/ftc-pushdownmenu-react';
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(
  <PushdownMenu>
    <PushdownItem name={"简体中文"} url={"#"} selected={true} />
    <PushdownItem name={"繁体中文"} url={"http://big5.ftchinese.com/"} />
    <PushdownItem name={"英文"} url={"https://www.ft.com/"} />
  </PushdownMenu>,
  document.getElementById('root')
);
```

## Props
### Props of PushdownMenu
#### children
Must be a or an array of PushdownItem

###  Props of PushdownItem

#### name
Type string. Required. The name of the list item.

#### url
Type string. Optional. Default '#'. The url site to which you jump when clicking the list item.


#### selected
Type boolean. Required. Decide the item is shown or not when the pushdown menu is shrinked. That's to say, the item with prop selected = {true} will be shown on the top of the menu, and it is only shown when the menu is shrinked.
npm package: @ftchinese/ftc-searchbar-react
Description: The search bar for FTC, which is a  partial of ftc-header. It is the react version.
Author: wangyichen
Latest version: 1.3.1

# ftc-searchbar-react

[![](https://travis-ci.org/wangyichen1064431086/ftc-searchbar-react.svg?branch=master)](https://travis-ci.org/wangyichen1064431086/ftc-searchbar-react)

The searchbar for ftc-header-react.

## Install

```cmd
cd yourProject
npm install react react-dom prop-types
npm install "@ftchinese/ftc-searchbar-react" --save
```

## Usage

Example:

```js
import SearchBar from '@ftchinese/ftc-searchbar-react';
import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(
  <SearchBar postUrl="\search" placeholderText = "输入年月日‘xxxx-xx-xx’可搜索该日存档" />,
  document.getElementById('root')
);
```

## props

### postUrl

Type String. **Required**. The url string for post your search.

### placeholderText

Type String. **Optional**. The placeholder word in search bar. Default is ''.

### sticky

Type Bool.**Optional**. This is **the new prop in this version**. With it you can decide the search bar to be sticky on the top of page when scrolling or not.
npm package: @ftchinese/ftc-share
Description: Share module
Author: weiguo.ni
Latest version: 4.0.0

# FTC Social Share Component

Version 4.0 is a breaking change from previous relsease. In this version JS is no longer relied on. Instead, we try to built everything static.

## Usage

In your nunjucks setting, add a search path `$CWD/node_modules/@ftchinese`.

### Simple way

Then include a template file `{% include "ftc-share/dist/o-share.html" %}`. In the render context provide a field `share` (See below the data strcuture).

Done. The included partial file has already inlined CSS and JS assets. And the JS function has already been initialized.

### Manual way

If you prefer to build assets yourself, then include template file `{% inlcude "ftc-share/views/partials/o-share.html" %}`. Provide a field `share` the same way above.

Import `main.js` and `main.scss`. How you import them depends on you build/bundl tools.

For JS you have to initialize it: `new Share()`

For SCSS, you have to set `$o-share-is-silent: false` before importing `main.scss`.

## `share` data

In the data to render nunjucks template, specify a field `share`:

```js
share: {
  inverse: true | false,
  title: encodeURIComponent("Article tile to show"),
  url: encodeURIComponent("http://interactive.ftchinese.com/components/ftc-share.html"),
  summary: encodeURIComponent("A short summary of the content to share")
}
```

## Custom Template

The nunjuck template you include from this module provide social platforms of `wechat, weibo, linkedin, facebook, twitter`. If you do not want ot show all of them, you can generate your own partial files. In a node.js file:

```js
const { resolve } = require('path');
const Share = require('ftc-share');
const share = new Share(['wechat', 'weibo']);
// this will generate an HTML-only template
share.buildPartial('views/partials/o-share.html'));
  .catch(err => {
    console.log(err);
  });
// this will generate the template with inlined css and js
share.buildBundle('views/partials/o-share-bundle.html')
  .catch(err => {
    console.log(err);
  });
```
npm package: @ftchinese/social-images
Description: FTC social images
Author: weiguo.ni
Latest version: 1.3.0

Generate social platform images.

## Installation

```
npm install @ftchinese/social-images --save-dev
```

## API

For node.js only. NOT frontend js.

```js
socialImages(options)
```

`options` is an object with:

* `to` String. Destination directory relative to node.js running process. Default `public/social-images`.
* `png` Boolean. Also produce png files when generating svg. Default `true`.
* `color` String | null. Optional. Color to draw the icon. `null` removes any color, and SVG without filling color is black. If omitted, use the icon's default color `#fff`.
* `background` String | null. Optional. Color set on icon's background. `null` removes the background. If omitted, use the icon's official color.
* Returns promise.

## Example

```js
socialImages({
    to: 'social-images', // path.resolve(process.cwd(), 'social-images')
    png: false, // do not generate png files. Only svg.
    color: '#a7a59b',
    background: null // removes background
  })
  .catch(err => {
    console.log(err);
  });
```
npm package: @ftchinese/sql-trim
Description: Tag function to trim whitespace in ES6 template string
Author: weiguo.ni
Latest version: 0.0.1

Tag function to trim whitespaces and turn template string into one line. This is mainly used to write fomatted sql statement.

Example
```js
const sql = require('@ftchinese/sql-trim');

const stmt = sql`
SELECT name AS name,
    email AS email,
    mobile_phone AS mobilePhone
FROM user
WHERE id = :id
LIMIT 1`;

const [rows, ] = conn.execute(stmt, {1});
```
`stmt` will be one line of string: `SELECT name AS name, email AS email, mobile_phone AS mobilePhone FROM user WHERE id = :id LIMIT 1`.
npm package: @ftd-el/antd-lowcode-materials
Description: Antd for LowCode
Latest version: 1.1.1

<h2><img width="30" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"> Ant Design For Lowcode</h2>

[![NPM version][npm-image-antd]][npm-url-antd]

### [在线示例 / DEMO](https://alifd.alicdn.com/npm/@alilc/antd-lowcode-materials@1.1.0/build/lowcode/index.html)

### 使用 / Usage
#### NPM
```js
const { material } from '@alilc/lowcode-engine';
const assets = require('@alilc/antd-lowcode-materials/build/lowcode/assets-prod.json');

// in GeneralWorkbench init
material.setAssets(assets);
```

#### CDN
```js
// in GeneralWorkbench init
const assets = await (await fetch(`https://alifd.alicdn.com/npm/@alilc/antd-lowcode-materials@1.1.0/build/lowcode/assets-prod.json`)).json();
material.setAssets(assets);
```

[npm-image-antd]: https://img.shields.io/npm/v/@alilc/antd-lowcode-materials.svg?style=flat-square
[npm-url-antd]: http://npmjs.org/package/@alilc/antd-lowcode-materials
npm package: @ftdata/api-client
Description: Cliente HTTP compartilhável para integração com a API, incluindo gerenciamento de tokens e refresh token
Author: ftdata Team
Latest version: 2.5.1

# @ftdata/api-client

Cliente HTTP compartilhável para integração com a API, incluindo gerenciamento de tokens e refresh token.

## Instalação

```bash
npm add @ftdata/api-client
```

## Uso

```typescript
import { ApiClient } from '@ftdata/api-client';

const apiClient = new ApiClient({
    apiUrl: process.env.REACT_APP_API_URL,
    grantType: process.env.REACT_APP_API_GRANT_TYPE,
    clientId: process.env.REACT_APP_API_CLIENT_ID,
    clientSecret: process.env.REACT_APP_API_CLIENT_SECRET,
    userId: process.env.REACT_APP_API_USER_ID
});

// Obter token inicial
const token = await apiClient.getToken();

// Usar a instância do axios configurada
const axiosInstance = apiClient.getInstance();
const response = await axiosInstance.get('/endpoint');
```

## Funcionalidades

- Gerenciamento automático de tokens
- Refresh token automático
- Fila de requisições durante refresh
- Interceptors configurados
- Tipagem TypeScript