main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
455 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Extractor function for an ArrayExpression type value node.
|
---|
3 | * An array expression is an expression with [] syntax.
|
---|
4 | *
|
---|
5 | * @returns - An array of the extracted elements.
|
---|
6 | */
|
---|
7 | export default function extractValueFromArrayExpression(value) {
|
---|
8 | // eslint-disable-next-line global-require
|
---|
9 | const getValue = require('.').default;
|
---|
10 | return value.elements.map((element) => {
|
---|
11 | if (element === null) return undefined;
|
---|
12 | return getValue(element);
|
---|
13 | });
|
---|
14 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.