varops

Object for parsing javascript operators from variables

Usage no npm install needed!

<script type="module">
  import varops from 'https://cdn.skypack.dev/varops';
</script>

README

varops

Travis (.com)

Object for parsing javascript operators from variables

Install

$ yarn add varops
$ npm install varops

Usage (ES6 imports)

import varops from 'varops';

const plus = '+';
const maths = varops[plus](1, 10);

console.log(maths); // 11

Support for these operators;

+ - * / ** %

License

MIT © Benjamin Hollway