# demo-simple-tools

> A tools project

Latest version **1.0.5** (published 2021-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install demo-simple-tools
pnpm add demo-simple-tools
yarn add demo-simple-tools
bun add demo-simple-tools
```

## 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.5 |
| Published | 2021-08-05 |
| First published | 2021-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | meilincheng |
| Maintainers | meilinch |
| Keywords | tool |

## Links

- npm: https://www.npmjs.com/package/demo-simple-tools
- npm.io page: https://npm.io/package/demo-simple-tools

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-08-05
- 1.0.4 — 2021-08-04
- 1.0.3 — 2021-08-04
- 1.0.2 — 2021-08-04
- 1.0.1 — 2021-08-03
- 1.0.0 — 2021-08-03

## README

# typescript-tools-simple

> A tools project

## 工具类

```js
import tools from 'demo-simple-tools'
// 页面DOM加载完毕之后调用
tools.watermark({})
```

- 配置项

```js
const DEFAULT_SETTINGS = {
  id: 'water_mark_id', // 水印id
  text: '水印文本', // 水印的内容
  color: '#333', // 颜色
  opacity: 0.1, // 透明度
  fontSize: 20, // 字体
  width: 200, // 单个水印宽度
  height: 200, // 单个水印长度
  left: 0, // 水印整体左边距离
  top: 0, // 水印整体顶边距离
  right: 0, // 水印整体右边距离
  bottom: 0, // 水印整体顶边距离
  slope: -15, // 水印倾斜度数
  parentId: null // 水印插件挂载的父元素id,默认挂在body上
}
```

## 自定义指令

```js
  import tools from 'demo-simple-tools'
  import Vue from 'vue'

  const directives: any = tools.directives
  const directivesKey = Object.keys(directives)
  directivesKey.map((item) => {
    Vue.directive(item, directives[item])
  })
```

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