# number-helpers

> Collection of NPM Module dedicated for numbers and math

Latest version **1.0.6** (published 2014-06-23) · 0 weekly downloads

## Install

```sh
npm install number-helpers
pnpm add number-helpers
yarn add number-helpers
bun add number-helpers
```

## 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.6 |
| Published | 2014-06-23 |
| First published | 2014-06-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ramesh Mahadevan |
| Maintainers | rameshrm |
| Keywords | numbers, happy, happy numbers, math, helpers |

## Links

- npm: https://www.npmjs.com/package/number-helpers
- Repository: https://github.com/RameshRM/numbers
- Issues: https://github.com/RameshRM/numbers/issues
- npm.io page: https://npm.io/package/number-helpers

## Dependencies (2)

- [chai](https://npm.io/package/chai.md) *
- [mocha](https://npm.io/package/mocha.md) *

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2014-06-23
- 1.0.5 — 2014-06-23
- 1.0.3 — 2014-06-22
- 1.0.2 — 2014-06-22
- 1.0.1 — 2014-06-22
- 1.0.0 — 2014-06-22

## README

number-helpers [![Build Status](https://travis-ci.org/RameshRM/numbers.svg?branch=master)](https://travis-ci.org/RameshRM/numbers)
=======

Collection of NPM Module dedicated for numbers and math

#### Happy Numbers

##### What Is Happy Number 

Happy Number is square every digit of a number left to right and keep adding up the sum until the result is 1

UnHappy Number will never result in 1 , mostly will reach a infinite loop.

###### Example

###### Input is 7 - Happy Number

```
  (7)*(7) = 49;
  (4*4) + (9*9) => 16 + 81 = 97
  (9*9) + (7*7) => 81 + 49 = 130
  (1*1) + (3*3) + (0*0) => 1 + 9 + 0 = 10
  (1*1) + (0*0) => 1 + 0 = 1
```

###### Input is 2 - UnHappy Number

```
  (2*2) = 4;
  (4*4) = 16;
  (1*1) + (6*6) => 1 + 36 = 37;
  (3*3) + (6*6) => 9 + 36 = 45;
  (4*4) + (5*5) => 16 + 25 = 41;
  (4*4) + (1*1) => 16 + 1 = 17;
  (1*1) + (7*7) => 1 + 49 = 50;
  (5*5) + (0*0) => 25 + 0 = 25;
  (2*2) + (5*5) => 4 + 25 = 29;
  (2*2) + (9*9) => 4 + 81 = 85;
  (8*8) + (5*5) => 64 + 25 = 89;
  (8*8) + (9*9) => 64 + 81 = 155;
  (1*1) + (5*5) + (5*5) => 1 + 25 + 25 = 51;
  (5*5) + (1*1) => 25 + 1 = 26;
  (2*2) + (6*6) => 4  + 36 = 40;
  (4*4) + (0*0) => 16 + 0; = 16; //inifinte loop @ 2nd step (4*4)
```


##### Installation 

```node

  var number-helpers = require('number-helpers');
  
  /* input number is 7 ***/
  number-helpers.ishappy(7); /*** Returns True ***/

  /* input number is 1 ***/
  number-helpers.ishappy(1); /*** Returns True ***/
  
  /* input number is 10 ***/
  number-helpers.ishappy(10); /*** Returns True ***/


  /* input number is 2 ***/
  number-helpers.ishappy(2); /*** Returns False ***/
  
```

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