Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 2.25 KB

README.md

File metadata and controls

71 lines (48 loc) · 2.25 KB

asciimoticon-core: Getting Started

Author: Chris Rabe

asciimoticon-web: asciimoticon-web.herokuapp.com

Build Status

Nodejs Installation

npm install asciimoticon-core --save

Demo Videos

Full Documentation

Please visit our documentation page to see the full list of functionalities.

Basic JS Usage

NOTE: This snippet only covers the basic functionality of asciimoticon-core.

const core = require('asciimoticon-core');

// Convert text to special ASCII texts
const text = 'test';

const witchText = core.text.toWitchtext(text);
const fancyText = core.text.toFancytext(text);
const flipText = core.text.toFliptext(text);
const fliptextTable = core.text.toFliptextTable(text);

console.log(witchText); //†Σ$†
console.log(fancyText); //тєѕт
console.log(flipText); //ʇsǝʇ
console.log(fliptextTable); //(ノ ゜Д゜)ノ ︵  ʇsǝʇ

// Convert numbers into ASCII emoticons

const number = 5;

const dice = core.number.dice(number); // 1 - 6 sides
const dollar = core.number.dollarbill(number);
const loading = core.number.loading(number);

console.log(dice); // ⚄
console.log(dollar); // [̲̅$̲̅(̲5̲̅̅)̲̅$̲̅]
console.log(loading); // █▒▒▒▒▒▒▒▒▒

// Get predefined faces with associated words on them

const faces = core.faces;

for (const faceName in faces) {
    const face = faces[faceName];
    console.log(`${face.ascii} : ${face.words}`); // TOO MANY TO DEFINE
}

Additional Links