# byte-utils

> > 该包主要提供工具函数，目前提供如下工具函数

Latest version **1.0.1** (published 2020-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install byte-utils
pnpm add byte-utils
yarn add byte-utils
bun add byte-utils
```

## 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.1 |
| Published | 2020-08-12 |
| First published | 2020-08-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ebyte0 |

## Links

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

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.27.0

## Recent versions

- 1.0.1 (latest) — 2020-08-12
- 1.0.0 — 2020-08-12

## README

# 说明文档

## 基本功能介绍
> 该包主要提供工具函数，目前提供如下工具函数

- 日期格式化

## 使用步骤
```js
const utils = require('byte-utils')

let d = new Date()
let ret = utils.formatDate(d, 'yyyy-MM-DD')
console.log(ret) // 2020-08-20

let ret1 = utils.sum(100)
console.log(ret1) // 5050
```

## API说明
- formatDate
  + 参数一：日期对象
  + 参数二：格式通配符，比如 yyyy-MM-DD
  + 返回值：格式化之后的日期字符串
- sum
  + 参数一：要求和的数字
  + 返回值：求和的结果

## 开源协议
![](https://img.shields.io/badge/licence-MIT-blue)

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