mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
refactor(yaml): simplify merge type (#5877)
This commit is contained in:
parent
f86e91119f
commit
aa757d8803
@ -5,15 +5,9 @@
|
||||
|
||||
import type { Type } from "../_type.ts";
|
||||
|
||||
function resolveYamlMerge(data: string): boolean {
|
||||
return data === "<<" || data === null;
|
||||
}
|
||||
|
||||
export const merge: Type<"scalar", unknown> = {
|
||||
tag: "tag:yaml.org,2002:merge",
|
||||
kind: "scalar",
|
||||
resolve: resolveYamlMerge,
|
||||
construct(data) {
|
||||
return data;
|
||||
},
|
||||
resolve: (data: unknown): boolean => data === "<<" || data === null,
|
||||
construct: (data: unknown): unknown => data,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user