3.0.3 • Published 3 years ago

rpncc v3.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

rpncc

Build Status npm GitHub license npm total downloads

This is a program for Reverse Polish notation utility. It converts or calculates a expressions to Reverse Polish notation.

Use examples

First, install this module in your project.

$ npm install rpncc

Import this module in your source code and call like below.

var Rpn = require('rpncc');
var rpn = new Rpn();

console.log(rpn.convert(["1", "+", "2", "*", "3"]));     // -> [ '1', '2', '3', '*', '+' ]
console.log(rpn.calculate([ '1', '2', '3', '*', '+' ])); // -> 7
console.log(rpn.revert([ '1', '2', '3', '*', '+' ]));    // -> ["1", "+", "2", "*", "3"]

Testing

rpncc uses ava for testing. You can run test cases by installing dependencies then run "npm test" command.

$ npm install
$ npm test

License

This software is released under the MIT License, see LICENSE.txt.

3.0.3

3 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.3

6 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago