# node-algorithms

> A node.js library to implement algorithms providing a semantic way.

Latest version **0.1.0** (published 2016-08-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-algorithms
pnpm add node-algorithms
yarn add node-algorithms
bun add node-algorithms
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-08-15 |
| First published | 2016-08-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | tom@0x101.com |
| Maintainers | tomasperezv |
| Keywords | algorithms |

## Links

- npm: https://www.npmjs.com/package/node-algorithms
- Repository: https://github.com/tomasperezv/node-algorithms
- Issues: https://github.com/tomasperezv/node-algorithms/issues
- npm.io page: https://npm.io/package/node-algorithms

## Dependencies (4)

- [bignum](https://npm.io/package/bignum.md) ~0.6.2
- [big-integer](https://npm.io/package/big-integer.md) ~1.1.8
- [line-reader](https://npm.io/package/line-reader.md) ~0.2.3
- [node-pushover-alerts](https://npm.io/package/node-pushover-alerts.md) git+ssh://git@github.com/tomasperezv/node-pushover-alerts.git

## Recent versions

- 0.1.0 (latest) — 2016-08-15

## README

Algorithms
============
A node.js library providing a semantic way for implementing algorithms.

Used to solve project-euler and topcoder problems.

![Project Euler](https://projecteuler.net/profile/tomasperezv.png)


```javascript
    var testAlgorithm = new Algorithm();
  
    testAlgorithm.prototype.solve = function(limit, multipleOf) {
    
      var multiples = [];
  
      this.iterate({
        start: 1,
        limit: limit
       }).onEach(function(current) {
        if (current.isMultiple(multipleOf)) {
          multiples.push(current.value);
        }
      });
    
    }
    ...
    ...
    console.log(new testAlgorithm().solve(1000, [3, 5]).toString());
```

### Run the problems

```shell
./problems/runner.js
Counting summations - total: 175, time: 0.69 s => Check Failed.
```

### Push notifications when problem execution ends

Optionally problems runner supports an extra parameter `p` that will send a push notification using [Pushover](https://pushover.net/). For that reason the package `node-pushover-alerts` is included in the package.json. You will need to have a `./config/pushover.json` file, containing your user and token for authentication.

```shell
./problems/runner.js -p
Counting summations - total: 175, time: 0.69 s => Check Failed.
Message sent: {"status":1,"request":"c4efe36f51adf23781e90c33efb96249"}
```

Example of `./config/pushover.json`

```json
{
        "user": "",
        "token": ""
}
```

### Dependencies  
	big-integer: an arbitrary-length integer library for Javascript. 
	https://github.com/peterolson/BigInteger.js

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