An open API service indexing awesome lists of open source software.

https://github.com/camillebaronnet/calculator

:trophy: Ergonomic and modern calculator
https://github.com/camillebaronnet/calculator

calculator calculator-application grammar javascript pegjs

Last synced: 10 days ago
JSON representation

:trophy: Ergonomic and modern calculator

Awesome Lists containing this project

README

        

# Calculator

Modern calculator build in HTML, CSS and Javascript. A custom grammar was built with [PEG.js](https://pegjs.org/).

**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
```