# @ctsy/common

Latest version **1.0.16** (published 2023-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ctsy/common
pnpm add @ctsy/common
yarn add @ctsy/common
bun add @ctsy/common
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.16 |
| Published | 2023-03-08 |
| First published | 2019-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | CastleMY |
| Maintainers | yanpengquan, ida_xyt |

## Links

- npm: https://www.npmjs.com/package/@ctsy/common
- Repository: https://github.com/YanCastle/castle-function
- npm.io page: https://npm.io/package/@ctsy/common

## Dependencies (2)

- [dayjs](https://npm.io/package/dayjs.md) *
- [lodash](https://npm.io/package/lodash.md) *

## Recent versions

- 1.0.16 (latest) — 2023-03-08
- 1.0.15 — 2022-09-23
- 1.0.14 — 2022-06-23
- 1.0.13 — 2022-06-09
- 1.0.12 — 2022-05-10
- 1.0.11 — 2022-04-13
- 1.0.10 — 2022-01-24
- 1.0.9 — 2022-01-21
- 1.0.8 — 2021-12-10
- 1.0.7 — 2021-12-09
- 1.0.6 — 2021-12-09
- 1.0.5 — 2021-06-30
- 1.0.4 — 2021-03-10
- 1.0.3 — 2021-03-10
- 1.0.2 — 2020-08-05
- … 2 more at https://npm.io/package/@ctsy/common/versions

## README

基础操作方法封装
```typescript
/**
 * 仿造php的array_columns函数
 * @param arr
 * @param column
 * @returns {Array}
 */
export declare function array_columns(arr: any, column: string, unique?: boolean): string[];
/**
 * 取唯一值
 * @param arr
 */
export declare function array_unique(arr: string[] | any): {}[];
/**
 * 设置对象中的某个键的值为对象的键
 * @param arr
 * @param column
 */
export declare function array_key_set(arr: Object | Object[], column: string, more?: boolean): any;
/**
 * 树形结构对象生成函数
 * @param arr
 * @param config
 * @param pvalue
 */
export declare function array_tree(arr: any[], config?: {
    pfield: string;
    ufield: string;
    sub_name: string;
}, pvalue?: number): any;

```

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