main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
632 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.default = extractValueFromSequenceExpression;
|
---|
| 7 | /**
|
---|
| 8 | * Extractor function for a SequenceExpression type value node.
|
---|
| 9 | * A Sequence expression is an object with an attribute named
|
---|
| 10 | * expressions which contains an array of different types
|
---|
| 11 | * of expression objects.
|
---|
| 12 | *
|
---|
| 13 | * @returns - An array of the extracted elements.
|
---|
| 14 | */
|
---|
| 15 | function extractValueFromSequenceExpression(value) {
|
---|
| 16 | // eslint-disable-next-line global-require
|
---|
| 17 | var getValue = require('.').default;
|
---|
| 18 | return value.expressions.map(function (element) {
|
---|
| 19 | return getValue(element);
|
---|
| 20 | });
|
---|
| 21 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.