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
- Host: GitHub
- URL: https://github.com/camillebaronnet/calculator
- Owner: camillebaronnet
- Created: 2018-03-10T13:55:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-26T12:00:30.000Z (almost 7 years ago)
- Last Synced: 2024-11-18T08:55:37.832Z (6 months ago)
- Topics: calculator, calculator-application, grammar, javascript, pegjs
- Language: JavaScript
- Homepage:
- Size: 818 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
## 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
```