Skip to content

camillebaronnet/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator

Modern calculator build in HTML, CSS and Javascript. A custom grammar was built with PEG.js.

Demo : https://camillebaronnet.github.io/calculator/dist/index.html

Calculator

Features

  • Addition, substraction, multiplication, division
  • Custom variables with emoji support, accents and underscore
  • Comment line support with hashtag
  • Live result for each line
  • Line highlight at mouseover of the result
  • Syntax highlighting
  • Support common mathematical constants (pi, e, ln10, ln2, log10e, log2e, sqrt1_2, sqrt2)

Installation

Download or clone the project and run /dist/index.html on modern browser.

Contribute

Clone the projet and download dependencies :

git clone [email protected]:camillebaronnet/calculator.git
cd calculator/
npm install

Work on grammar src/grammar.pegjs :

npm run watch

Finally, build before commit :

npm run build

Releases

No releases published

Packages

No packages published