https://github.com/bahdcoder/pling-plong
https://github.com/bahdcoder/pling-plong
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bahdcoder/pling-plong
- Owner: bahdcoder
- Created: 2017-10-23T17:28:45.000Z (over 8 years ago)
- Default Branch: pling-plong
- Last Pushed: 2017-10-24T09:39:44.000Z (over 8 years ago)
- Last Synced: 2025-10-25T17:49:22.164Z (9 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# RAINDROPS
## Introduction
PlingPlong is a simple Node Program, that takes in a number, determines if that number has prime factors, and if yes, generates a particular string, depending on the presence of 3, 5, and 7 in the prime factors of this number.
## Directory Structure
- The PlingPlong class is found in the `pling-plong.js`
- Another class exists, which is the PrimeFactor class, found in `prime-factors.js`, and this simply takes the responsibility of generating the prime factors of any number
- Simple use cases of the class are in `index.js`
- All tests for the PlingPlong class, are in `tests/pling-plong.spec.js`
- All tests for the PrimeFactor class, are in `tests/prime-factor.spec.js`
- The `package.json` file defines one development dependency which is the `chai` library
## How to Run Project
- Clone this repository locally by running:
```bash
git clone https://github.com/kati-frantz/pling-plong.git
```
- Install project dependencies (devDependencies)
```bash
npm install
```
- Run `index.js` script to see results
```bash
node index.js
```
## Tests
- To run tests, you need to install mocha globally , or locally.
```bash
npm i -g mocha
```
Test command:
```bash
mocha
```