Sha256: 3072b8278ae1a65c46da340dbe107f308af727ba3f43f925b115d50bc6858c18

Contents?: true

Size: 778 Bytes

Versions: 29

Compression:

Stored size: 778 Bytes

Contents

"use strict";

exports.__esModule = true;
exports.TaggedTemplateExpression = TaggedTemplateExpression;
exports.TemplateElement = TemplateElement;
exports.TemplateLiteral = TemplateLiteral;
function TaggedTemplateExpression(node) {
  this.print(node.tag, node);
  this.print(node.quasi, node);
}

function TemplateElement(node, parent) {
  var isFirst = parent.quasis[0] === node;
  var isLast = parent.quasis[parent.quasis.length - 1] === node;

  var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");

  this.token(value);
}

function TemplateLiteral(node) {
  var quasis = node.quasis;

  for (var i = 0; i < quasis.length; i++) {
    this.print(quasis[i], node);

    if (i + 1 < quasis.length) {
      this.print(node.expressions[i], node);
    }
  }
}

Version data entries

29 entries across 29 versions & 9 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.51 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.50 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.49 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.48 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.47 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.46 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.45 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.44 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.43 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.42 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.41 node_modules/babel-generator/lib/generators/template-literals.js
immosquare-cleaner-0.1.40 node_modules/babel-generator/lib/generators/template-literals.js
ilog-0.4.1 node_modules/babel-generator/lib/generators/template-literals.js
ilog-0.4.0 node_modules/babel-generator/lib/generators/template-literals.js
ilog-0.3.3 node_modules/babel-generator/lib/generators/template-literals.js
optimacms-0.4.3 spec/dummy/node_modules/babel-generator/lib/generators/template-literals.js
optimacms-0.4.2 spec/dummy/node_modules/babel-generator/lib/generators/template-literals.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/babel-generator/lib/generators/template-literals.js
lux_assets-0.2.11 ./node_modules/babel-generator/lib/generators/template-literals.js