Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runk/node-reverse-polish-notation
Reverse Polish Notation - Javascript implemenation
https://github.com/runk/node-reverse-polish-notation
Last synced: about 2 months ago
JSON representation
Reverse Polish Notation - Javascript implemenation
- Host: GitHub
- URL: https://github.com/runk/node-reverse-polish-notation
- Owner: runk
- License: mit
- Created: 2015-11-12T10:37:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-12T11:33:33.000Z (about 9 years ago)
- Last Synced: 2024-11-16T17:48:57.719Z (about 2 months ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-reverse-polish-notation [![Build Status](https://travis-ci.org/runk/node-reverse-polish-notation.svg?branch=master)](https://travis-ci.org/runk/node-reverse-polish-notation)
Reverse Polish Notation - Native Javascript implemenation
## Installation
```shell
npm i reverse-polish-notation
```## Usage
** see code samples in `./test` directory **
```javascript
var rpn = require('reverse-polish-notation')
console.log(rpn('5 1 2 + 4 * + 3 -')) // prints "14"
console.log(rpn('3 4 5 * -')) // prints "-17"
console.log(rpn('3.1 -4.3 5.6 * -')) // prints "27.18"
```## References
- https://en.wikipedia.org/wiki/Reverse_Polish_notation## License
MIT