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:
574 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = extractValueFromArrayExpression;
|
---|
7 | /**
|
---|
8 | * Extractor function for an ArrayExpression type value node.
|
---|
9 | * An array expression is an expression with [] syntax.
|
---|
10 | *
|
---|
11 | * @returns - An array of the extracted elements.
|
---|
12 | */
|
---|
13 | function extractValueFromArrayExpression(value) {
|
---|
14 | // eslint-disable-next-line global-require
|
---|
15 | var getValue = require('.').default;
|
---|
16 | return value.elements.map(function (element) {
|
---|
17 | if (element === null) return undefined;
|
---|
18 | return getValue(element);
|
---|
19 | });
|
---|
20 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.