string.js 421 B

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