Giter Site home page Giter Site logo

units_converter_extension's Introduction

Smart Units Converter - Browser Extension

An extension that converts your selected values into popular units. Saves time, Makes life easier:dancer:

MIT license GitHub issues GitHub pull requests GitHub contributors Build Status Coveralls github Maintainability DOI

Click on the image below to view the video

Alt text

Use Cases

  • Convert $ to ¥ when you are shopping abroad
  • Convert kilometers to miles when you are planning routes before driving
  • Convert kilograms to pounds when you are buying food
  • Convert celcius to fahrenheit when you are talking about weather
  • Convert hours to seconds when you are calculating time
  • Convert celcius to Fahrenheit when you are calculating temperature
  • Convert Mb/s to b/s when you are calculating internet speed
  • Convert square meter to square feet when you are calculating the measure of area
  • Convert litres to gallons when you are calculating the volume for liquid items online
  • Convert TB to GB when you are buying data storage devices

Installation

  • Clone the repository using git clone https://github.com/nihitmittal/units_converter_extension.git

  • In the chrome browser open chrome://extensions/

  • Enable developer settings if it is not enabled

  • Choose Load Unpacked

  • Select the repository folder that was cloned in the first step image

  • The extension will now be added to the Chrome image

  • Screenshot of working of the extension

  • Displays the most relevant converted unit first image

  • Click on view all button to view all of the converted units for that metric image

Languages

  • JavaScript
  • HTML
  • CSS

Software Requirements

  • Node.js
  • NPM

Style Checker and Analyzer

Standard Js

Installation npm install standard --global in comand line interface to install globally npm install standard --save-dev in command line interface to install locally

Running Standard Js go to root of project and type standard if StandardJs is installed globally go to root of project and type npx standard if StandardJs is installed locally Instead of installing it using npm, you can also use the extension available on VS Code

IDE and Code Fomatter

  • IDE and Style Checker: VSCode

  • Code Style Formatter: Beautify

  • Code Syntax Checker : Eslint for Vscode plugin.

VS Code uses js-beautify internally, but it lacks the ability to modify the style you wish to use. This extension enables running js-beautify in VS Code, AND honouring any .jsbeautifyrc file in the open file's path tree to load your code styling. Run with F1 Beautify (to beautify a selection) or F1 Beautify file.

Test and Coverage

Unit Test

  • Mocha and Chai.

  • Setup

    From the repository root, run: npm install --save-dev mocha chai

    Then run: npm test [filename]

    npm will then attempt to run all test files that end with *.test.js , if you do not specify filename.

Code Coverage

Automated Analysis Tool

deepScan

Documentation (Wiki)

"What" and "How" Docs

"Why" and "Why not" Docs

Think about the case when you shopping on Amazon. When you want to purchase Dumbbells on the website, the weight unit is somewhat you are not familiar with. You will google search the conversion of two units. But now, we have units converter, helping you to covert the unit by a single select with the mouse.

Feature Model

<!--  This model was created online using SPLOT's Feature Model Editor (http://www.splot-research.org) -->
<feature_model name="Unit Converter Extension">
    <feature_tree> 
        :r Unit Converter Extension(_r) 
            :m Length(_r_1) 
            :m Mass(_r_3) 
            :m Temperature(_r_4) 
            :m Time(_r_5) 
            :m Currency(_r_6) 
            :m Area(_r_7) 
            :m Datarate(_r_8) 
            :m Speed(_r_10) 
    </feature_tree>
    <constraints> 
        constraint_1:_r_1 or _r_7 
        constraint_2:_r_1 or _r_5 or _r_10 
    </constraints>
</feature_model>

feature_model

units_converter_extension's People

Contributors

ankitgargsma avatar weiranfu avatar tianq20 avatar bhavesh242 avatar durga71 avatar nihitmittal avatar stevemenezes avatar aadilk97 avatar roadhog666 avatar waynewen719 avatar nikithareddyt avatar wanghngleee avatar aryamanj03 avatar

units_converter_extension's Issues

Fix the reference error

When the unpacked the code, there is a reference error coming up in the extension manager for all the conversions. though it is not bothering the working of the project but still it's better to get rid of it

Add an extra button

We have precisely displayed only 2 relevant conversions for any unit, create a button upon which when clicked will display all the conversions for that unit

Fix the currency conversion

There is a need to fix the API call to get the current conversation values for the currencies from one to another

Setting the precision of the values

The converted values are given a precision of 3 in normal scenario and if the value is less than 10^-3 then the value is printed with complete precision

Update the manifest version

The manifest version 2 used in the project is depreciated by Google in January 2023, so there is a need it to version 3

Display only the relevant values for any conversion

Right now, the code is displaying the conversion from one unit to all the relevant units even if the value is more than 10 ^ 3 or less than 10^-3 which makes the conversion irrelevant. We need to display only the relevant conversions.

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.