Giter Site home page Giter Site logo

jsrambler's Introduction

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 = 36

Usage:

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: HEY

rambler.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 for a better example.

JS version: ES5

PokePoke

It pokemonizes the input string. The names are fetched from the pokeapi.

This uses NodeJS for fetching data from the API server.

Please use it with caution since the API server often crashes.

Usage:

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.