varops

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i varops

Weekly Downloads

76

Version

1.0.1

License

MIT

Unpacked Size

3 kB

Total Files

5

Last publish

Collaborators

  • nothingrandom