Giter Club home page Giter Club logo

ts-visual_nuts's Introduction

Visual Nuts

Requirements

  • TypeScript
  • Node.js
  • Yarn

Instructions to run

type yarn in your terminal to install the packages from package.json

after this change .env file to choose what challenge you want to run:

 //1 challenge1  or 2 to challenge2
CHALLENGE = 1

after this you need to transpile to js. To do this type this command in your terminal:

 yarn run compile

this step will create a dist folder with your .js files

├───src
│   │   challenge1.js
│   │   challenge2.js
│   │   program.js
│   │
│   └───data
│           countries.json
│
└───test
        challenge1.test.js
        challenge2.test.js

Now to run, type this command bellow in your terminal:

node .\dist\src\program.js 

Result

Challenge 1
...
Nuts
Visual
82
83
Visual
Nuts
86
Visual
88
89
...

Result

challeng2

┌─────────────────┬────────┐
│     (index)     │ Values │
├─────────────────┼────────┤
│ Total Countries │   7    │
└─────────────────┴────────┘
┌──────────────────────────────────────────────┬───────────────────────────────────────┐
│                   (index)                    │                   0                   │
├──────────────────────────────────────────────┼───────────────────────────────────────┤
│ Countries where they officially speak German │ { country: 'BE', languages: [Array] } │
└──────────────────────────────────────────────┴───────────────────────────────────────┘
┌───────────────────────────────────────────────────────┬───────────────────────────────────────┬───────────────────────────────────────┐
│                        (index)                        │                   0                   │                   1                   │
├───────────────────────────────────────────────────────┼───────────────────────────────────────┼───────────────────────────────────────┤
│ Country with the highest number of official languages │ { country: 'BE', languages: [Array] } │ { country: 'EE', languages: [Array] } │
└───────────────────────────────────────────────────────┴───────────────────────────────────────┴───────────────────────────────────────┘
┌────────────────────────────────────────────────────────┬────┬────┬────┐
│                        (index)                         │ en │ nl │ de │
├────────────────────────────────────────────────────────┼────┼────┼────┤
│ The most common official language(s), of all countries │ 2  │ 2  │ 2  │
└────────────────────────────────────────────────────────┴────┴────┴────┘

to run tests

npx jest

result:

Test Suites: 4 passed, 4 total
Tests:       24 passed, 24 total
Snapshots:   0 total
Time:        3.5 s

ts-visual_nuts's People

Stargazers

William Majanja avatar Rafael Neves avatar

Watchers

Thiago da Silva Adriano avatar James Cloos avatar  avatar

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.