Sha256: f983073f72878830f7265538c9d372bd330a0360dc328643ad949473d5f1f2d6
Contents?: true
Size: 514 Bytes
Versions: 24
Compression:
Stored size: 514 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addCommentBefore = addCommentBefore; exports.default = addComment; function addCommentBefore(str, indent, comment) { if (!comment) return str; const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`); return `#${cc}\n${indent}${str}`; } function addComment(str, indent, comment) { return !comment ? str : comment.indexOf('\n') === -1 ? `${str} #${comment}` : `${str}\n` + comment.replace(/^/gm, `${indent || ''}#`); }
Version data entries
24 entries across 24 versions & 2 rubygems