npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lauradebaets/examenopdracht

v0.3.0

Published

a LCD Display that can show the Temperature. You can choose size of the letter and with or without frame.

Downloads

15

Readme

Examenopdracht 2020 - Temperatuur LCD Display - De Baets Laura

npm badge

ESLint

Markdown Linter

Tests

Description

This library was created using typescript. It displays the temperature in an LCD style in the console. Below you can see the output of this library:

 ___________________________
|    _     _        _   _   |
|  | _|    _||_|   |_| |    |
|  ||_  /  _|  |       |_   |
|___________________________|

Installation instructions

You must have typescript!!! otherwise ->

npm install -g typescript

Installing the home-automation for windows:

npm i @lauradebaets/home-automation

To run the library with the index.ts:

ts-node ./index.ts

Multiple usage instructions and examples

General usage

If you want to use the library you just have to add these 2 lines in your program.

const application = new App({temperature: "-123456789, °C",size:"normal",border: true})
application.getLCD()

On this line below you must give the temperature, the size and say if you want a frame.

  • At the temperature you can only enter the following characters: "0123456789, ° C"
  • With the size you can choose between normal and big
  • At the border you have to give if you want a frame.(true = with frame, false = without frame)

You can change the order. this does not affect the operation of the library.

const application = new App({temperature: "-123456789, °C",size:"normal",border: true})

The line below then ensures that the temperature is printed in the console.

application.getLCD()

Examples of the LCD library

Normal size and without frame

This code is in the index.ts. These are the 2 lines of code that you must integrate in your program to use the library.

const application = new App({temperature: "-123456789, °C",size:"normal",border: false})
application.getLCD()

Below you see the output of the getLCD () method.

       _  _     _  _  _  _  _        _  _
 _   | _| _||_||_ |_   ||_||_|      |_||
     ||_  _|  | _||_|  ||_| _| /       |_

Normal size and with frame

const application = new App({temperature: "-123456789, °C",size:"normal",border: true})
application.getLCD()
 ____________________________________________
|        _  _     _  _  _  _  _        _  _  |
|  _   | _| _||_||_ |_   ||_||_|      |_||   |
|      ||_  _|  | _||_|  ||_| _| /       |_  |
|____________________________________________|

Big size and without frame

const application = new App({temperature: "-123456789, °C",size:"big",border: false})
application.getLCD()
           ___  ___       ___  ___  ___  ___  ___            ___  ___
         |    |    ||   ||    |        ||   ||   |          |   ||
         |    |    ||   ||    |        ||   ||   |          |   ||
 ___       ___  ___  ___  ___  ___       ___  ___            ___
         ||        |    |    ||   |    ||   |    |               |
         ||        |    |    ||   |    ||   |    |   /           |
           ___  ___       ___  ___       ___  ___   /             ___

Big size and with frame

const application = new App({temperature: "-123456789, °C",size:"big",border: true})
application.getLCD()
 ________________________________________________________________________
|            ___  ___       ___  ___  ___  ___  ___            ___  ___  |
|          |    |    ||   ||    |        ||   ||   |          |   ||     |
|          |    |    ||   ||    |        ||   ||   |          |   ||     |
|  ___       ___  ___  ___  ___  ___       ___  ___            ___       |
|          ||        |    |    ||   |    ||   |    |               |     |
|          ||        |    |    ||   |    ||   |    |   /           |     |
|            ___  ___       ___  ___       ___  ___   /             ___  |
|________________________________________________________________________|

Frame is dependent of the length

As you can see here, the frame depends on how many digits you have.

const application = new App({temperature: "100°C",size:"big",border: true})
application.getLCD()
 _________________
|     _  _  _  _  |
|   || || ||_||   |
|   ||_||_|   |_  |
|_________________|

Youtube

Look at the video with examples. You can watch the video below here.

IMAGE ALT TEXT HERE

NPM

Here you can visit the npm website -> npm

Tests

Tests have been made to develop this library. The tests are all successful, see image below:

test_succes

To run the tests use the following command:

npm run test

Linter

There is also a linter is this project. Linter analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. To use the linter you have to run the following command.

npm run lint

Generated documentation

TypeDoc is used to generate the documentation. Tor run it, you must run the following commando

typedoc --out docs src

The documentation can be see here

License

Distributed under the MIT License. See License.txt for more information.

Sources

The split() method: see here

Author information

De Baets Laura

Student at VIVES Brugge Elektronica -ICT, 2nd year

e-mail: [email protected]