Sha256: 10f40eac7d70b368947c8c8a4f1d80f3697156c7dad705ab9c7cfe92d77199fa

Contents?: true

Size: 547 Bytes

Versions: 8

Compression:

Stored size: 547 Bytes

Contents

'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = extractValueFromJSXFragment;
/**
 * Extractor function for a JSXFragment type value node.
 *
 * Returns self-closing element with correct name.
 */
function extractValueFromJSXFragment(value) {
  // eslint-disable-next-line global-require
  var getValue = require('.').default;

  if (value.children.length === 0) {
    return '<></>';
  }
  return '<>' + [].concat(value.children).map(function (x) {
    return getValue(x);
  }).join('') + '</>';
}

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
immosquare-cleaner-0.1.50 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
immosquare-cleaner-0.1.49 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
immosquare-cleaner-0.1.48 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
immosquare-cleaner-0.1.47 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
immosquare-cleaner-0.1.46 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
immosquare-cleaner-0.1.45 node_modules/jsx-ast-utils/lib/values/JSXFragment.js
decidim-0.26.8 packages/eslint-config/node_modules/jsx-ast-utils/lib/values/JSXFragment.js