Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
457 bytes
|
Line | |
---|
1 | var utils = require('../utils');
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Perform `op` on the `left` and `right` operands.
|
---|
5 | *
|
---|
6 | * @param {String} op
|
---|
7 | * @param {Node} left
|
---|
8 | * @param {Node} right
|
---|
9 | * @return {Node}
|
---|
10 | * @api public
|
---|
11 | */
|
---|
12 |
|
---|
13 | function operate(op, left, right){
|
---|
14 | utils.assertType(op, 'string', 'op');
|
---|
15 | utils.assertPresent(left, 'left');
|
---|
16 | utils.assertPresent(right, 'right');
|
---|
17 | return left.operate(op.val, right);
|
---|
18 | }
|
---|
19 | operate.params = ['op', 'left', 'right'];
|
---|
20 | module.exports = operate;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.