math-prop.js 238 B

123456789101112131415
  1. var nodes = require('../nodes');
  2. /**
  3. * Get Math `prop`.
  4. *
  5. * @param {String} prop
  6. * @return {Unit}
  7. * @api private
  8. */
  9. function math(prop){
  10. return new nodes.Unit(Math[prop.string]);
  11. }
  12. math.params = ['prop'];
  13. module.exports = math;