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

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i varops

    Weekly Downloads

    74

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3 kB

    Total Files

    5

    Last publish

    Collaborators

    • nothingrandom