Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/546669204/typescript-pick
https://github.com/546669204/typescript-pick
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/546669204/typescript-pick
- Owner: 546669204
- Created: 2022-11-19T05:34:39.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-19T05:40:41.000Z (about 2 years ago)
- Last Synced: 2024-11-07T11:23:49.695Z (2 months ago)
- Language: TypeScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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" }
```