aboutsummaryrefslogtreecommitdiff
path: root/node_modules/yaml/dist/stringify/stringifyComment.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/yaml/dist/stringify/stringifyComment.js')
-rw-r--r--node_modules/yaml/dist/stringify/stringifyComment.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/node_modules/yaml/dist/stringify/stringifyComment.js b/node_modules/yaml/dist/stringify/stringifyComment.js
deleted file mode 100644
index 26bf361..0000000
--- a/node_modules/yaml/dist/stringify/stringifyComment.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict';
-
-/**
- * Stringifies a comment.
- *
- * Empty comment lines are left empty,
- * lines consisting of a single space are replaced by `#`,
- * and all other lines are prefixed with a `#`.
- */
-const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');
-function indentComment(comment, indent) {
- if (/^\n+$/.test(comment))
- return comment.substring(1);
- return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
-}
-const lineComment = (str, indent, comment) => str.endsWith('\n')
- ? indentComment(comment, indent)
- : comment.includes('\n')
- ? '\n' + indentComment(comment, indent)
- : (str.endsWith(' ') ? '' : ' ') + comment;
-
-exports.indentComment = indentComment;
-exports.lineComment = lineComment;
-exports.stringifyComment = stringifyComment;