# thh-utils-test

> lx-utils

Latest version **1.0.26** (published 2020-11-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install thh-utils-test
pnpm add thh-utils-test
yarn add thh-utils-test
bun add thh-utils-test
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.26 |
| Published | 2020-11-24 |
| First published | 2020-11-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 636.3 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | thh2020 |
| Maintainers | thh2020 |

## Links

- npm: https://www.npmjs.com/package/thh-utils-test
- npm.io page: https://npm.io/package/thh-utils-test

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.20.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.20
- [date-fns](https://npm.io/package/date-fns.md) ^2.16.1
- [prettier](https://npm.io/package/prettier.md) ^2.2.0

## Recent versions

- 1.0.26 (latest) — 2020-11-24
- 1.0.25 — 2020-11-24

## README

lx-utils

## 安装

```bash
npm install --save lx-utils
```

## 配置

推荐按需引入，后编译，需先安装 eslint-plugin-import

```bash
npm install --save-dev eslint-plugin-import
```

`babel.config.js`

```javascript
module.exports = {
  plugins: [
    [
      'import',
      {
        libraryName: 'lx-utils',
        camel2DashComponentName: false,
        libraryDirectory: 'src',
      },
      'lx-utils',
    ],
  ],
};
```

`vue.config.js`

```javascript
module.exports = {
  // ...
  transpileDependencies: [/[/\\]node_modules[/\\]lx-utils[/\\]/],
};
```

## 使用

```javascript
import { getNodePath, checkAppVersion } from 'lx-utils';
```

## 已有工具方法说明

- cloneDeepPlainObject 对 plainObject 对象简单深度 copy
- deepForEachArray 深度遍历数组每一项（包含 children 子项）做处理
- formatDate 日期格式化：yyyy-MM-dd
- formatDateTime 时间格式化：yyyy-MM-dd HH:mm:ss
- getArrayItemByKeyVal 通过一个键值获取一个对象数组中有含这个键值的项
- getNodePath 在一个树状结构数据上寻找某个节点，返回完整的节点路径
- iExtend 用多个源对象的属性覆盖目标对象的已定义属性
- isValidVal 是否是有效值，除了 null, undefined, ''以外的值
- lazyload 图片懒加载
- parseUrl 对 url 各部分进行拆分分析
- parseUrlParams 获取 url 查询字符串参数
- stringifyParams 把一个对象序列化为查询字符串
- add 加法，fix 精度问题
- divide 除法，fix 精度问题
- multiply 乘法，fix 精度问题
- subtract 减法，fix 精度问题

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