# helpme-js

> A js utilities package for node.js for me

Latest version **0.1.7** (published 2021-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install helpme-js
pnpm add helpme-js
yarn add helpme-js
bun add helpme-js
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2021-12-19 |
| First published | 2021-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 0 |
| Unpacked size | 48.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | orchsik |
| Maintainers | orchsik |
| Keywords | javascript, util |

## Links

- npm: https://www.npmjs.com/package/helpme-js
- Repository: https://github.com/orchsik/helpme-js
- Homepage: https://github.com/orchsik/helpme-js#readme
- Issues: https://github.com/orchsik/helpme-js/issues
- npm.io page: https://npm.io/package/helpme-js

## 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

- 0.1.7 (latest) — 2021-12-19
- 0.1.6 — 2021-12-19
- 0.1.5 — 2021-12-18
- 0.1.4 — 2021-12-18
- 0.1.3 — 2021-12-18
- 0.1.2 — 2021-12-18
- 0.1.1 — 2021-12-18
- 0.0.9 — 2021-12-18
- 0.0.8 — 2021-12-18
- 0.0.7 — 2021-12-18
- 0.0.6 — 2021-12-18
- 0.0.5 — 2021-12-18
- 0.0.4 — 2021-12-18
- 0.0.3 — 2021-12-18
- 0.0.2 — 2021-12-18
- … 1 more at https://npm.io/package/helpme-js/versions

## README

# helpme-js

## Installing

Using npm:

```bash
$ npm install helpme-js
```

Using yarn:

```bash
$ yarn add helpme-js
```

<br/>

## 🎈 HColors

### In javascript

```js
const { HColors } = require('helpme-js');
HColors.red[0];
HColors.red[5];
HColors.red[9];
```

### In typescript

```ts
import { HColors } from 'helpme-js';
HColors.red[0];
HColors.red[5];
HColors.red[9];
```

### There are the following colors and the 10 colors that change gradually.

- transparency
- grey
- red
- pink
- grape
- violet
- indigo
- blue
- cyan
- teal
- green
- lime
- yellow
- orange

  <br/>

## 🎈 HMath

### In javascript

```js
const { HMath } = require("helpme-js");
HMath.estimateNumber(15.24, 1, APPROXIMATE_TYPE.CEIL))
HMath.estimateNumber(15.24, 1, APPROXIMATE_TYPE.FLOOR))
HMath.estimateNumber(15.24, 1, APPROXIMATE_TYPE.ROUND))
```

### In typescript

```ts
import { HMath } from "helpme-js";
HMath.estimateNumber(15.24, 1, APPROXIMATE_TYPE.CEIL))
HMath.estimateNumber(15.24, 1, APPROXIMATE_TYPE.FLOOR))
HMath.estimateNumber(15.24, 1, APPROXIMATE_TYPE.ROUND))
```

### Methods

- HMath.estimateNumber(number, approximatePlace[, approximateType])

  > approximateType : "올림", "내림", "반올림", (only typescript) APPROXIMATE_TYPE.CEIL, APPROXIMATE_TYPE.FLOOR, APPROXIMATE_TYPE.ROUND

<br/>

## 🎈 HHelper

### In javascript

```js
const { HHelper } = require('helpme-js');
const {
  waitFor,
  sameArrayItem,
  sortByObjItem,
  orderBy,
  groupBy,
  deepCopy,
  SPACING_TYPE,
  deleteSpacing,
  uniqueObjArrayFor,
  oneTap,
} = HHelper;
```

### In typescript

```ts
import { HHelper } from 'helpme-js';
```

### Methods

### waitFor(delay)

```ts
await waitFor(); // default 1000 millisecond
await waitFor(3000);
```

### sameArrayItem(arr1, arr2): boolean

```ts
sameArrayItem([3, 2, 1], [1, 2, 3]); // true
```

### sortByObjItem({list, key})

- Sort by key Sort by number, then sort by character

```ts
const list = [
  { name: 'ccc_1', age: 30 },
  { name: 'bbb_2', age: 20 },
  { name: 'aaa_3', age: 10 },
];
sortByObjItem({ list, key: 'name' });
// [
//   { name: 'ccc_1', age: 30 },
//   { name: 'bbb_2', age: 20 },
//   { name: 'aaa_3', age: 10 },
// ];
```

### orderBy( keys: string[], orders: ('asc' | 'desc')[], list: AnyObject[])

```ts
const users = [
  { name: 'c', age: 3, sex: 0 },
  { name: 'b', age: 2, sex: 0 },
  { name: 'a', age: 2, sex: 1 },
];
orderBy(['age', 'sex'], ['asc', 'asc'], users);
// [
//   { name: 'b', age: 2, sex: 0 },
//   { name: 'a', age: 2, sex: 1 },
//   { name: 'c', age: 3, sex: 0 },
// ];
```

### groupBy(arr: any[], fn: any)

```ts
groupBy([6.1, 4.2, 6.3], Math.floor);
// {
//   keys: ['4', '6'],
//   byKey: { '4': [4.2], '6': [6.1, 6.3] },
// };
```

### oneTap(callback, delay)

```ts
oneTap(() => console.log('execute callback'), 1000);
```

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