# return-to-ming

Latest version **1.0.5** (published 2022-02-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install return-to-ming
pnpm add return-to-ming
yarn add return-to-ming
bun add return-to-ming
```

## 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.5 |
| Published | 2022-02-09 |
| First published | 2022-02-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hxmbaba |

## Links

- npm: https://www.npmjs.com/package/return-to-ming
- npm.io page: https://npm.io/package/return-to-ming

## Recent versions

- 1.0.5 (latest) — 2022-02-09
- 1.0.4 — 2022-02-09
- 1.0.3 — 2022-02-08
- 1.0.2 — 2022-02-08
- 1.0.1 — 2022-02-08
- 1.0.0 — 2022-02-08

## README

<!--
 *@description:
 *@author: return_to_ming
 *@date: 2022-02-08 16:44
-->

# JS 库

# 项目中使用

- 安装

  - `npm install return-to-ming`

- 使用示例

```js
const { multiply, order } = require("return-to-ming");
console.log(multiply(0.1, 0.2), 0.1 * 0.2);
// 0.02 0.020000000000000004
console.log(
  order(
    [
      { name: "回向明", age: "22" },
      { name: "张三", age: "21" },
      { name: "李四", age: "24" },
    ],
    "age"
  )
);
/* [
{ name: '张三', age: '21' },
{ name: '回向明', age: '22' },
{ name: '李四', age: '24' }
] */
```

- API

  - multiply：
    两数精准相乘。
    例：
    传参：0.001, 3
    返回值：0.003
  - order
    对象数组按照某个属性数字大小排序，默认升序，传 1 降序
    例：
    传参：[{ name: '回向明', age: '22' }, { name: '张三', age: '21' }, { name: '李四', age: '24' }], age, 1
    返回值：[{ name: '张三', age: '21' }, { name: '回向明', age: '22' }, { name: '李四', age: '24' }]
  - getUrlParam
    获取 url 中的参数。
    例：
    传参：'http://www.nowcoder.com?key=1&key=2&key=3&test=4#hehe'
    返回值：{ key: ['1', '2', '3'], test: '4' }

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