Sha256: 5618d14e8ec45969f3b18a5b8c51f9cbc2523d286f7649885024fbd78e867777

Contents?: true

Size: 558 Bytes

Versions: 52

Compression:

Stored size: 558 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = extractValueFromFunctionExpression;
/**
 * 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.
 */
function extractValueFromFunctionExpression(value) {
  return function () {
    return value;
  };
}

Version data entries

52 entries across 52 versions & 4 rubygems

Version Path
govuk_publishing_components-17.12.1 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.12.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.11.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.10.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.9.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.8.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.7.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.6.1 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.6.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.5.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.4.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.3.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.2.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.1.1 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.1.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-17.0.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-16.29.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-16.28.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-16.27.1 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js
govuk_publishing_components-16.27.0 node_modules/jsx-ast-utils/lib/values/expressions/FunctionExpression.js