# lq-util

Latest version **0.0.9** (published 2020-09-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install lq-util
pnpm add lq-util
yarn add lq-util
bun add lq-util
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2020-09-11 |
| First published | 2020-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | a327921510 |
| Keywords | uitl |

## Links

- npm: https://www.npmjs.com/package/lq-util
- npm.io page: https://npm.io/package/lq-util

## Dependencies (5)

- [lodash](https://npm.io/package/lodash.md) ^4.17.19
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [the-answer](https://npm.io/package/the-answer.md) ^1.0.0
- [typescript](https://npm.io/package/typescript.md) ^3.9.7
- [rollup-plugin-typescript2](https://npm.io/package/rollup-plugin-typescript2.md) ^0.27.2

## Recent versions

- 0.0.9 (latest) — 2020-09-11
- 0.0.8 — 2020-09-11
- 0.0.7 — 2020-09-11
- 0.0.6 — 2020-09-11

## README

# <a href="">lq-util</a> <span>v0.0.9</span>

<!-- div class="toc-container" -->

<!-- div -->

## `Methods`
* <a href="#getByteLength">`getByteLength`</a>

<!-- /div -->

<!-- /div -->

<!-- div class="doc-container" -->

<!-- div -->

## `Methods`

<!-- div -->

<h3 id="getByteLength"><a href="#getByteLength" class="fa fa-link"></a><code>getByteLength(str)</code></h3>

获取字符串字节长度

#### Arguments
1. `str` *(string)*: 需要获取字节数的字符串

#### Returns
*(number)*: 返回字符串字节长度

#### Example
```js
getByteLength('hello world')
// => 11

getByteLength('你好')
// => 4

getByteLength('  ')
// => 2

getByteLength('你好 world')
// => 10

getByteLength({})
// -1

getByteLength(9527)
// -1
```
---

<!-- /div -->

<!-- /div -->

<!-- /div -->

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