Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/fourtyone11/origin-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/node_modules/yaml/browser/dist/tags/failsafe/string.js')
-rw-r--r--assets/node_modules/yaml/browser/dist/tags/failsafe/string.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/assets/node_modules/yaml/browser/dist/tags/failsafe/string.js b/assets/node_modules/yaml/browser/dist/tags/failsafe/string.js
new file mode 100644
index 0000000..882181c
--- /dev/null
+++ b/assets/node_modules/yaml/browser/dist/tags/failsafe/string.js
@@ -0,0 +1,40 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.resolveString = void 0;
+
+var _stringify = require("../../stringify");
+
+var _options = require("../options");
+
+var resolveString = function resolveString(doc, node) {
+ // on error, will return { str: string, errors: Error[] }
+ var res = node.strValue;
+ if (!res) return '';
+ if (typeof res === 'string') return res;
+ res.errors.forEach(function (error) {
+ if (!error.source) error.source = node;
+ doc.errors.push(error);
+ });
+ return res.str;
+};
+
+exports.resolveString = resolveString;
+var _default = {
+ identify: function identify(value) {
+ return typeof value === 'string';
+ },
+ default: true,
+ tag: 'tag:yaml.org,2002:str',
+ resolve: resolveString,
+ stringify: function stringify(item, ctx, onComment, onChompKeep) {
+ ctx = Object.assign({
+ actualString: true
+ }, ctx);
+ return (0, _stringify.stringifyString)(item, ctx, onComment, onChompKeep);
+ },
+ options: _options.strOptions
+};
+exports.default = _default; \ No newline at end of file