Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/546669204/typescript-pick


https://github.com/546669204/typescript-pick

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

README

        

# typescript-pick

一款智能的数据挑选工具

根据 变量的 `ts` 定义 自动剔除掉多余的属性

# Usage

```
yarn add typescript-pick
```

```ts
import { pick } from "typescript-pick";

interface T {
a: number,
b: string,
}

const data = {
a: 1,
b: "str",
c: 7,
d: true
}

pick(data) // => { a:1,b:"str" }

```