Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yardwill/rubber
A simple util lib
https://github.com/yardwill/rubber
Last synced: about 1 month ago
JSON representation
A simple util lib
- Host: GitHub
- URL: https://github.com/yardwill/rubber
- Owner: YardWill
- Created: 2019-02-18T03:23:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:54:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-17T05:47:33.482Z (3 months ago)
- Language: TypeScript
- Size: 314 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Rubber
[![npm version](https://badge.fury.io/js/rubber-util.svg)](https://badge.fury.io/js/rubber-util)
[![codecov](https://codecov.io/gh/YardWill/rubber/branch/master/graph/badge.svg)](https://codecov.io/gh/YardWill/rubber)
[![CircleCI](https://circleci.com/gh/YardWill/rubber.svg?style=svg)](https://circleci.com/gh/YardWill/rubber)工具类 类似lodash
## api
```typescript
export declare const setData: (data: any, target: string[], value: any) => any;
export declare const getData: (data: any, target: string[]) => any;
export declare const unique: (array: any[]) => any[];
export declare const mapToOptions: (map: {
[x: string]: string;
}) => ({
value: boolean;
label: string;
} | {
value: number;
label: string;
} | {
value: string;
label: string;
})[];// 过滤空字符串的字段(方便后端构造db query) 生成新的对象
export declare const filterData: (data: object) => {};
export declare const graphql: (data: any) => string;
```