Sha256: 0cfa72dba4100ce113b3f4f909a85d021fdc13a5abd4e990519bcaed84ef6648
Contents?: true
Size: 981 Bytes
Versions: 28
Compression:
Stored size: 981 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.resolveString = void 0; var _stringify = require("../../stringify"); var _options = require("../options"); const resolveString = (doc, node) => { // on error, will return { str: string, errors: Error[] } const res = node.strValue; if (!res) return ''; if (typeof res === 'string') return res; res.errors.forEach(error => { if (!error.source) error.source = node; doc.errors.push(error); }); return res.str; }; exports.resolveString = resolveString; var _default = { identify: value => typeof value === 'string', default: true, tag: 'tag:yaml.org,2002:str', resolve: resolveString, 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;
Version data entries
28 entries across 24 versions & 2 rubygems