Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 984 Bytes

README.md

File metadata and controls

44 lines (29 loc) · 984 Bytes

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