Sha256: 47f3e961179fa13658e7bd8ccb8025a64470c235dcdebb70ef3ee9ce4532ca93
Contents?: true
Size: 445 Bytes
Versions: 23
Compression:
Stored size: 445 Bytes
Contents
export function addCommentBefore(str, indent, comment) { if (!comment) return str; var cc = comment.replace(/[\s\S]^/gm, "$&".concat(indent, "#")); return "#".concat(cc, "\n").concat(indent).concat(str); } export default function addComment(str, indent, comment) { return !comment ? str : comment.indexOf('\n') === -1 ? "".concat(str, " #").concat(comment) : "".concat(str, "\n") + comment.replace(/^/gm, "".concat(indent || '', "#")); }
Version data entries
23 entries across 23 versions & 1 rubygems