mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
chore: update dependencies
This commit is contained in:
parent
a6750da5da
commit
c21aa7fbbf
5 changed files with 8266 additions and 4059 deletions
|
@ -5,7 +5,10 @@ import { validateNoObjectAliases } from "./validateNoObjectAliases";
|
|||
* Loads a YAML file safely while removing object anchors/aliases (including arrays)
|
||||
*/
|
||||
export function loadYamlSafely(yamlStr: string): any {
|
||||
const loaded = yaml.safeLoad(yamlStr);
|
||||
let loaded = yaml.safeLoad(yamlStr);
|
||||
if (loaded == null || typeof loaded !== "object") {
|
||||
loaded = {};
|
||||
}
|
||||
validateNoObjectAliases(loaded);
|
||||
return loaded;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue