hexo/node_modules/stylus/lib/functions/operate.js

21 lines
477 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
var utils = require('../utils');
/**
* Perform `op` on the `left` and `right` operands.
*
* @param {String} op
* @param {Node} left
* @param {Node} right
* @return {Node}
* @api public
*/
function operate(op, left, right){
utils.assertType(op, 'string', 'op');
utils.assertPresent(left, 'left');
utils.assertPresent(right, 'right');
return left.operate(op.val, right);
}
operate.params = ['op', 'left', 'right'];
module.exports = operate;