string.js 457 B

12345678910111213141516
  1. 'use strict';
  2. var stringifyString = require('../../stringify/stringifyString.js');
  3. const string = {
  4. identify: value => typeof value === 'string',
  5. default: true,
  6. tag: 'tag:yaml.org,2002:str',
  7. resolve: str => str,
  8. stringify(item, ctx, onComment, onChompKeep) {
  9. ctx = Object.assign({ actualString: true }, ctx);
  10. return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);
  11. }
  12. };
  13. exports.string = string;