Sha256: 7a421e7c608ac0ca7790fd17a1abc2e48367f56eb1f99d4de6eeaaef99d7590d

Contents?: true

Size: 476 Bytes

Versions: 164

Compression:

Stored size: 476 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = addComments;
function addComments(node, type, comments) {
  if (!comments || !node) return node;
  const key = `${type}Comments`;
  if (node[key]) {
    if (type === "leading") {
      node[key] = comments.concat(node[key]);
    } else {
      node[key].push(...comments);
    }
  } else {
    node[key] = comments;
  }
  return node;
}

//# sourceMappingURL=addComments.js.map

Version data entries

164 entries across 16 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.40 node_modules/@babel/types/lib/comments/addComments.js
wice_grid-7.1.0 node_modules/@babel/types/lib/comments/addComments.js
immosquare-cleaner-0.1.39 node_modules/@babel/types/lib/comments/addComments.js
immosquare-cleaner-0.1.38 node_modules/@babel/types/lib/comments/addComments.js