UNPKG

d2-ui

Version:
20 lines (18 loc) 559 B
'use strict'; /** * Extractor function for a FunctionExpression type value node. * Statically, we can't execute the given function, so just return a function * to indicate that the value is present. * * @param - value - AST Value object with type `FunctionExpression` * @returns - The extracted value converted to correct type. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = extractValueFromFunctionExpression; function extractValueFromFunctionExpression(value) { return function () { return value; }; }