https://github.com/sidmishraw/jsrambler
The rambler, a Friday fun project in ES5
https://github.com/sidmishraw/jsrambler
base-conversion es5-javascript funny pokemonapi pokepoke rambler
Last synced: 3 months ago
JSON representation
The rambler, a Friday fun project in ES5
- Host: GitHub
- URL: https://github.com/sidmishraw/jsrambler
- Owner: sidmishraw
- Created: 2017-06-02T22:37:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-04T21:42:26.000Z (almost 8 years ago)
- Last Synced: 2025-01-15T06:48:35.906Z (4 months ago)
- Topics: base-conversion, es5-javascript, funny, pokemonapi, pokepoke, rambler
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Rambler and PokePoke
A friday fun project.
## Rambler
It "**rambles**" the string passed in.Rambles is just my word for converting the string based on a particular base.
Minimum base = 2
Maximum base = 36Usage:
```javascript
const rambler = require("./rambler.js");
// The namespace is bulbasaur
// you need to use `bulbasaur` to access the module's
// functions
rambler.bulbasaur.test("hey", 36); // output: HEYrambler.bulbasaur.test("8", 2); // output: 1000
rambler.bulbasaur.test("duck your head", 16); // output: D1EC1422181E1B11EAD
console.log("charset for base 12 = ", rambler.bulbasaur.charSet(12));
// output: charset for base 12 = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B' ]console.log(rambler.bulbasaur.convertToBase("bulbasaur", 2));
// output: 10111111010101101110101110010101111011011
```### Methods of bulbasaur:
* `rambler.bulbasaur.charSet( base )` : **base** is an integral number.* `rambler.bulbasaur.convertToBase(inputString, base)` : **inputString** is
the input string and **base** is an integral number, the base you want the
string to be rambled into. It returns the rambled string.* `rambler.bulbasaur.test(inputString, base)` : prints the rambled string to
the console. Just a test method.Please refer to the [main.js](./main.js) for a better example.
###### JS version: ES5
## PokePoke
It **pokemonizes** the input string.
The names are fetched from the [pokeapi](http://pokeapi.co/).This uses NodeJS for fetching data from the API server.
Please use it with caution since the API server often crashes.
Usage:
```javascript
const pokepoke = require("./pokepoke");// call the callback function after making the pokemonname string
// with the console.log in it.
pokepoke.pokepoke.pokemonize("Hey there, get here!", function (data) {console.log("Pokemonized String = " + data);
});
```
```
// output:
Pokemonized String = Koffing^(*_*)^Cottonee^(*_*)^Clefairy^(*_*)^Floette^(*_*)^Golem^(*_*)^Mewtwo^(*_*)^Groudon^(*_*)^Pidgey^(*_*)^Grovyle^(*_*)^Mienfoo^(*_*)^Krookodile^(*_*)^Golbat^(*_*)^Klefki^(*_*)^Weepinbell^(*_*)^Buizel^(*_*)^Mr-mime^(*_*)^Cranidos
```
###### JS version: ES5
###### NodeJS: v7.10.0