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:
518 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Extractor function for a ChainExpression type value node.
|
---|
3 | * A member expression is accessing a property on an object `obj.property`.
|
---|
4 | *
|
---|
5 | * @param - value - AST Value object with type `ChainExpression`
|
---|
6 | * @returns - The extracted value converted to correct type
|
---|
7 | * and maintaing `obj?.property` convention.
|
---|
8 | */
|
---|
9 | export default function extractValueFromChainExpression(value) {
|
---|
10 | // eslint-disable-next-line global-require
|
---|
11 | const getValue = require('.').default;
|
---|
12 | return getValue(value.expression || value);
|
---|
13 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.