reverse-polish-notation

Reverse Polish Notation - Javascript implementation

Usage no npm install needed!

<script type="module">
  import reversePolishNotation from 'https://cdn.skypack.dev/reverse-polish-notation';
</script>

README

node-reverse-polish-notation Build Status

Reverse Polish Notation - Native Javascript implemenation

Installation

npm i reverse-polish-notation

Usage

** see code samples in ./test directory **

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

License

MIT