# antv-dom-util-patch

> A common util collection for antv projects

Latest version **2.0.6** (published 2022-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install antv-dom-util-patch
pnpm add antv-dom-util-patch
yarn add antv-dom-util-patch
bun add antv-dom-util-patch
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.6 |
| Published | 2022-09-21 |
| First published | 2022-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 39.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 72 |
| Author | https://github.com/orgs/antvis/people |
| Maintainers | wuwaki |
| Keywords | util, antv, g |

## Links

- npm: https://www.npmjs.com/package/antv-dom-util-patch
- Repository: https://github.com/antvis/util
- Homepage: https://github.com/antvis/util#readme
- Issues: https://github.com/antvis/util/issues
- npm.io page: https://npm.io/package/antv-dom-util-patch

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.0.3
- [node-html-parser](https://npm.io/package/node-html-parser.md) ^6.1.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 2.0.6 (latest) — 2022-09-21
- 2.0.5 — 2022-09-21
- 1.0.0 — 2022-09-21
- 2.0.4 — 2022-09-19

## README

# dom-util

> 为 `antv` 开发的轻量级工具方法库。


## 安装下载

> tnpm i --save @antv/util

```js
// 所有的 api 是都这么引入，名字不同而已
import { createDom, getStyle } from '@antv/dom-util';

const dom = createDom('<div></div>').appendTo(document.body);
```


## API 文档

> 目前使用到的、且推荐使用的 API 文档，不在文档内的不建议使用。
* createDom(string) `HTMLElement` 创建 dom 对象，支持复杂字符串
* addEventListener(dom, callback) `Object` 添加事件
```js
const handler = addEventListener(dom, function(ev) {

});
handler.remove();
```
* getHeight(dom) `Number`
* getWidth(dom) `Number`
* getOuterHeight(dom) `Number`
* getOuterWidth(dom) `Number`
* getRatio() `Number` 获取屏幕像素比
* getStyle(styleName) 获取样式
* modifyCss(obj) 修改样式

---
_Source: https://npm.io/package/antv-dom-util-patch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
