yaml_edit 1.0.3 copy "yaml_edit: ^1.0.3" to clipboard
yaml_edit: ^1.0.3 copied to clipboard

outdated

A library for YAML manipulation with comment and whitespace preservation.

Yaml Editor #

A library for YAML manipulation while preserving comments.

Disclaimer: This is not an officially supported Google product.

Usage #

A simple usage example:

import 'package:yaml_edit/yaml_edit.dart';

void main() {
  final yamlEditor = YamlEditor('{YAML: YAML}');
  yamlEditor.assign(['YAML'], "YAML Ain't Markup Language");
  print(yamlEditor);
  // Expected output:
  // {YAML: YAML Ain't Markup Language}
}

Testing #

Testing is done in two strategies: Unit testing (/test/editor_test.dart) and Golden testing (/test/golden_test.dart). More information on Golden testing and the input/output format can be found at /test/testdata/README.md.

These tests are automatically run with pub run test.

Limitations #

  1. Users are not allowed to define tags in the modifications.
  2. Map keys will always be added in the flow style.
44
likes
30
points
4.78M
downloads

Publisher

verified publishertools.dart.dev

Weekly Downloads

A library for YAML manipulation with comment and whitespace preservation.

License

Apache-2.0 (license)

Dependencies

collection, meta, source_span, yaml

More

Packages that depend on yaml_edit